G E B W E B https://gebweb.net 10 PRINT "GEB", 20 GOTO 10 Sun, 02 Apr 2017 08:39:11 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.5 Is ZCash the Answer to Bitcoin’s Limitations? https://gebweb.net/blogpost/2017/03/27/is-zcash-the-answer-to-bitcoins-limitations/ Mon, 27 Mar 2017 18:52:01 +0000 https://gebweb.net/?p=179 Continue reading »]]> Bitcoin has been around for a while now, and a few large issues have turned up:

  1. Transactions per second: The block size limit imposes a 3 transactions per second (tps) limit for the whole network. A far cry from the 2000 tps that VISA processes on average.
  2. Privacy: Absolutely everyone can see all your transactions. Bitcoin’s claim to anonymity only holds so long as nobody knows what addresses you control. And since most coins are bought on regulated exchanges these days, governments almost certainly know that.
  3. Decentralization: A few huge mining pools in China control more than 50% of the Bitcoin network, and could, if they wanted, take over everyone’s coins.

The first issue is causing prices of Bitcoin transactions to be expensive or slow (pick your poison!). Bitcoin has a variable transaction fee. Basically, whoever mines a block gets to write that part of the ledger, and will choose to include those transactions who are paying the most. This is causing transactions to cost $0.20-0.40 in times of congestion. More than most domestic bank transfers, but still a far cry from the $20 SWIFT fees for international bank transfers. This is causing a significant drag on adoption of Bitcoin for new use cases like micropayments.

There have been several attempts to fix or alleviate the tps-issue. Increases of the bitcoin block size limit, like Bitcoin Unlimited or more fundamental changes like Segregated Witness. But none have reached the level of adoption needed to go live. They have popular support in the bitcoin community, but due to issue number 3, Chinese miners effectively decide what gets adopted or not.

ZCash is a new cryptocurrency that is focused on privacy. It uses a very clever algorithm to hide transaction details like sender, recipient and amount from everyone except those user who are involved in a transaction. ZCash has gained a lot of support for its young age. Mining officially started in October 2016, and it already has reached rank 11 among the cryptocurrencies in terms of market cap (as of March 27, 2017).

ZCash is set to mine blocks four times as often as Bitcoin, so it has lower latency. Also, transactions are free right now, but this is likely due to less volume, and not to any fundamental upgrades when it comes to scaling. As far as I know, the scaling limitations of Bitcoin are not specifically addressed with ZCash either.

Another nice feature of ZCash is that it uses Equihash, a memory-intensive mining algorithm, which makes it very hard to manufacture purpose-built equipment for mining like the ASICs that dominate Bitcoin-mining. This is important, since it is unlikely to make economic sense to buy lots of standard hardware for mining companies who are competing against idle capacity in the already-paid-for hardware of gamers around the world. This is good for decentralization and also means a non-trivial amount of coins gets distributed to a lot of different people. A GPU is likely to almost pay for itself over the course of a year – a subsidy many gamers gladly accept. It also may mean that it will be easier to implement future upgrades to the protocol.

Disclaimer: This is not investment advice. I also don’t know enough about the company that created ZCash and what controls it has over the currency.

]]>
Bitcoin and the Steady-state economy https://gebweb.net/blogpost/2014/02/22/bitcoin-and-the-steady-state-economy/ Sat, 22 Feb 2014 08:50:58 +0000 http://gebweb.net/?p=167 Continue reading »]]> Bitcoin is rapidly gaining popularity. Despite the recent problems with the Mt.Gox bitcoin exchange, I think the Bitcoin protocol itself will prevail, and more and more people and businesses will start to use it.

I’ve started to experiment with using Bitcoin myself, and found that it works really well. For instance, the Android Bitcoin Wallet makes it easy to transfer money to friends (who use Bitcoin), or to merchants that accept them. New services are arriving in the Bitcoin ecosystem every day.

What does Bitcoin mean in the bigger scheme of things? Unlike most currencies, Bitcoin has the property that there is a fixed upper bound on the number of bitcoins that will ever by created. Currently, there are about 12.5 million bitcoins in existence, and there will never be more than 21 million.

Does this mean that Bitcoin is more well-suited for a Steady state economy? As there is a bound on the amount of physical resources the economy can use, and the environmental impact of economic growth continues to worsen, many, including myself, believe that an economy without the annual growth in energy and material use is desirable (the alternative being a crashing economy).

With Bitcoin, people who save money, are not immediately watered down. The fixed amount of bitcoins and the fixed amount of physical resources should give price-stability in the long run. A fixed amount of physical resources and an ever-increasing amount of traditional money supply leads to loss of value and an unhealthy incentive to go out and hoard resources. Which is exactly what rich people do today when they get their hands on more money: They run out and invest it in real estate, stocks, energy or materials.

]]>
Who is Googling You? https://gebweb.net/blogpost/2012/10/03/who-is-googling-you/ https://gebweb.net/blogpost/2012/10/03/who-is-googling-you/#comments Wed, 03 Oct 2012 11:15:35 +0000 http://gebweb.net/?p=149 Continue reading »]]> I recently watched “Du är googla” (You’ve been Googled) on NRKs web-TV. It has a few interesting points, and one which I found particularly interesting is how much the Google search results on your name matter. So, knowing a thing or two about Google and AdWords from my time working for Google, I set out to answer a few interesting questions.

The first is how many people are actually googling for me. Of course, I have a bit of statistics from Google Analytics on search queries that led the user to my homepage, but this only captures those that actually clicked the entry for my homepage, and there are many more search results.

So the first hunch was to use Google trends data, but disappointingly, there’s not enough search data for me out there. Unless you’re some public figure, you’re probably going to run into the same thing. But if you’re an optimist you can give Google Trends a try.

My next approach is a bit more powerful for people with low search traffic. I set up an AdWords campaign using my name as keywords.

You can have some fun here figuring out exactly what to write about yourself. The ad itself isn’t all that important, though it should be on topic. The real reason to do this is to provide some counter-intelligence on the people who are googling for you.

What you get, assuming you have reasonably low search traffic and not much competition advertising on your name, is a very cheap AdWords campaign. If you have a webpage, your webhost likely has AdWords coupons so it may even be free for a long time. With this method, what you get is a dashboard that tells you how many times your ad was triggered (in some cases, like if you run out of budget or your ad is not relevant, it may not always show up).

So on to the more interesting question: WHO is Googling You?  With AdWords you can even break down the data by geography, time of day etc. etc. which makes it more interesting. For instance, if you’re applying for a position, you may be able to see that someone in that particular location searched for you:

 

There are many other things you could see, like time of day and the exact search phrase used, like “Geir Engdahl IOI” or similar.

I’ll be back with more insights on this method when it’s been running for a little longer.

]]>
https://gebweb.net/blogpost/2012/10/03/who-is-googling-you/feed/ 3
Iran Next? https://gebweb.net/blogpost/2012/03/29/iran-next/ Thu, 29 Mar 2012 08:02:17 +0000 http://gebweb.net/?p=117 Continue reading »]]> Tension between Israel & the US and Iran has been growing the past few months. The economic sanctions are really starting to hurt Iran, but they are also hurting the West with higher oil prices. Blocking Iran’s oil exports is a big sacrifice in today’s tight oil market.

Then, there is the arrival of the third US aircraft carrier in the Middle East in the next week. It’s highly unusual for there to be more than a single aircraft carrier in any location.

Locations of US aircraft carriers and amphibious warfare ships

Obama has been busy the last few weeks making sure allies such as the UK and France are ready to release oil from their strategic petroleum reserves. This is supposedly because he wants to suppress high gas prices to help the economic recovery. But as I noted in my previous post, this is a spectacularly bad idea. Maybe he just wants them to be ready to pour out oil from the strategic reserves on short notice for a coming actual supply shortfall.

Today, the disturbing information that Israel’s army is cancelling leaves for Passover hit the newswires. The official explanation is problems with Gaza. However, cancelling leaves during the most important Jewish religious holiday sounds like overkill for a few under-equipped armed gangs in Gaza.

Edit: Another piece of information emerged today that Israel has gotten permission to use airfields in Azerbaijan for a strike against Iran. That helps Israel overcome the range problem and avoid having to perform in-air refuelling to reach Iran and fly back again. Also a great place to base search-and-rescue missions from.

Now, there are many reasons why a strike on Iran would be devastatingly dumb, and I think the odds are still against such a strike in the immediate future. But I have been surprised in the past…

]]>
Peeing Your Pants Just to Stay Warm https://gebweb.net/blogpost/2012/03/15/peeing-your-pants-just-to-stay-warm/ Thu, 15 Mar 2012 16:31:34 +0000 http://gebweb.net/?p=112 Continue reading »]]> The US and Great Britain are back at it, releasing their strategic oil reserves “in an effort to prevent high fuel prices derailing economic growth in an election year”. Last year, they did the same thing while Libya’s oil production was offline. The effect on oil prices lasted for  a whopping two weeks back then. This year’s action is, if possible, even more short-sighted.

Which part of the word strategic is it they don’t understand? Last year, there was at least a war and an actual disruption to oil production to go with the release. Now, unacceptably high prices are simply the new normal. I have seen no reports that the stockpiles were replenished after last year’s drawdown. The strategic oil reserves are sized to cover a complete breakdown of oil supply lines for one to two months. A limited drawdown of the size seen last year could go on for a little more than a year. If we need to use the strategic reserves just to maintain some resemblance of economic growth, you can expect another recession within that timeframe.

And what if there is an actual supply disruption in the future? A war with Iran? Unrest in Nigeria? The stockpiles will already be withered down, making the complete societal collapse that the strategic reserves are supposed to prevent that much closer. Extreme short-term thinking from the people in charge. Selling our future to make the party last a little longer… Their party… And you’re not invited…

]]>
OptiMap version 4 is here https://gebweb.net/blogpost/2012/01/25/optimap-version-4-is-here/ https://gebweb.net/blogpost/2012/01/25/optimap-version-4-is-here/#comments Wed, 25 Jan 2012 10:29:00 +0000 http://gebweb.net/?p=98 Continue reading »]]>

New user interface

Hold down shift while pressing reload to make sure the page fully reloads if OptiMap appears broken.

The first thing you’ll notice is a complete makeover of the user interface. The functionality has grown considerably since I first posted OptiMap in 2007, and the controls were scattered randomly around. Now, they are organized into neat little drawers on the left, in the order you are likely to be using them.

There is some new functionality as well. The ‘Edit Route’ section gives you the chance to re-order the trip after it has been computed. Have to visit one client first? No problem, drag to the top. You can also delete stops from the itinerary here.

OptiMap 4 also has a more powerful TSP solver routine. The new solver kicks in when there are more than 15 stops, and produces better and more robust solutions than the old engine. It is guaranteed to perform better than before, and in some hard cases I’ve tested, it improved the solutions by as much as 6-7%. That means that if you spent 8 hours on the road before, you now get home half an hour earlier.

Support for Garmin GPS units is now added as well. Support is experimental, since I only had access to one Garmin device, which did not support routes. I’m interested to hear whether this works on your device if you have a Garmin GPS.

There are some bug fixes as well: When pasting data from Excel spreadsheets into the bulk add box, the cell delimiters were lost. This is fixed. The print function used to show half a page of unnecessary white space at the bottom, thus it sometimes would print blank pages at the end. This is fixed so you won’t be wasting paper needlessly any more.

As a bonus, you may now access the service from a shorter address: www.optimap.net (the old address will continue to work, and the page will remain identical)

I hope you enjoy the update! Please post questions, feedback, bugs and suggestions here. I’m sure I broke something during the update…

]]>
https://gebweb.net/blogpost/2012/01/25/optimap-version-4-is-here/feed/ 385
Introducing SkyLib https://gebweb.net/blogpost/2011/11/04/introducing-skylib/ https://gebweb.net/blogpost/2011/11/04/introducing-skylib/#comments Fri, 04 Nov 2011 15:19:10 +0000 http://gebweb.net/blogpost/2011/11/04/introducing-skylib/ Continue reading »]]> SkyLib

For a long time now, my mantra has been optimization. To make the most out of limited resources makes sense both economically and environmentally. OptiMap was an example of this. Driving too far is just stupid. Using OptiMap saves you time and money and it saves the environment too.

There are many other wasteful behaviors we need to address to optimize the usefulness (utility) of our planet’s finite resources. When I started to learn about embodied energy, I was shocked by how much energy is spent in the process of manufacturing the products we buy. An average $20 book has an indirect footprint of 20 kg CO2, mainly due to extraction of the raw materials needed and manufacture of the book itself. This is the equivalent of driving an average car more than 130 kilometers. Given the sheer number of things that most people own, these indirect emissions certainly add up.

How can we optimize this? First, we need to realize that in many cases, ownership of these items is not why we buy them. We want access to the features that the item can provide. You don’t buy the boardgame Axis & Allies because you want to be the proud owner of it. You buy it to play it. And it probably collects dust 364 days a year.

If someone has the item I need, and it collects dust most of the time, they wouldn’t mind lending it to me, right. And I would certainly return the favor some other day. But we need to survey the resources available. Then make that information searchable. So that when you need a power drill or want to watch a movie, you can find the one closest to you. SkyLib.com is my attempt at doing this. Yes, it’s beta and yes it lacks many features. Certainly rough around the edges. But you can start organizing your stuff and building your personal library today.

Feedback is hugely appreciated! Please head over to SkyLib.com and give it a try. I’m already sharing 120+ items with you as of this post.

]]>
https://gebweb.net/blogpost/2011/11/04/introducing-skylib/feed/ 1
The Dynamic Programming Algorithm for the Travelling Salesman Problem https://gebweb.net/blogpost/2011/06/24/the-dynamic-programming-algorithm-for-the-travelling-salesman-problem/ https://gebweb.net/blogpost/2011/06/24/the-dynamic-programming-algorithm-for-the-travelling-salesman-problem/#comments Fri, 24 Jun 2011 09:52:00 +0000 http://gebweb.net/blogpost/2011/06/24/the-dynamic-programming-algorithm-for-the-travelling-salesman-problem/ Continue reading »]]> A reader asked me for some information on how the dynamic programming algorithm for the TSP works. I was surprised to find that a Google search found no good resources. Wikipedia merely acknowledges its existence: “One of the earliest applications of dynamic programming is the Held–Karp algorithm that solves the problem in time O(n22n).”

Consider the TSP problem with N+1 points labeled 0, 1, …, N. We start at point 0. The distance from point i to point j is dist[i][j].

In dynamic programming, we seek to solve a problem by first solving smaller instances of the same problem. We start by looking at the really trivial size problem: What is the best order to visit just one of the destinations?

Assume we have N destinations. There are N size-1 problems, one for each of the N destinations. The best way to visit each is the shortest path from node 0 to node N. We store the best solution to each of these problems in a table:

best[subset][end] = dist[0][end]

Here, subset represents which destinations have been visited. More specifically, subset is a bitmask: an integer where bit i is 1 if destination i has been visited and 0 otherwise. Also note that the stored solution is the solution to the A-Z TSP problem, so it does not include the cost to return to the origin. The variable end is the destination that this A-Z problem ends at.

Now, lets expand to all the A-Z TSP problems of size one larger:

best[subset][end] = min(best[subset \ { end }][i] + dist[i][end])

Here, i is an intermediary node that is 1 in subset and not equal to the end variable. Before we move on to the next size problem, we have to fill in all the possible subsets of the current size. Finding all of those subsets of size s is what the function nextSetOf(s) in BpTspSolver.js does. How do we justify this expansion? It does not matter to the distance of the larger problem in what order the intermediary destinations of the 1-size smaller problem ending at i was visited in, so we are safe to only store and look at the optimal such sub-solution.

Finally, when we reach the desired size where all the destinations are visited, we only need to look up the best solution to the A-Z TSP problem in the table:

best[2^(N+1)-1][N]

(2^(N+1)-1 is simply the integer with all the first N+1 bits set to 1). If we want to return to the origin, we instead take the min over all i of

best[2^(N+1)-1][i] + dist[i][0]

This then becomes the best solution to the roundtrip problem. It is important to note that while this solution may look fast, there are 2^(N+1) different subsets involved (really 2^N, because 0 is always visited). Also, each subset solution needs to be stored, causing high memory usage. However, O(2^N) is still much better than the brute force O(N!) solution. 10! is 3 628 800 while 2^10 is only 1024. With the brute force solution, OptiMap could solve optimally up to 9 destinations. The dynamic programming solution now allows OptiMap to solve optimally up to 15 locations.

]]>
https://gebweb.net/blogpost/2011/06/24/the-dynamic-programming-algorithm-for-the-travelling-salesman-problem/feed/ 9
OptiMap for Google Maps v3 released https://gebweb.net/blogpost/2011/06/03/optimap-for-google-maps-v3-released/ https://gebweb.net/blogpost/2011/06/03/optimap-for-google-maps-v3-released/#comments Fri, 03 Jun 2011 10:10:54 +0000 http://gebweb.net/blogpost/2011/06/03/optimap-for-google-maps-v3-released/ Continue reading »]]> Manhattan with 100 destinations

After being “almost ready” for way too long, the next version of OptiMap, based on Google Maps API version 3, is now launched. While I have tested most aspects of the application, there are most likely bugs, since the update touched almost all areas of the code. There are some improvements too, however:

  • More robust address lookups (a lot of people experienced a “failed to geocode” error when entering many addresses. This was due to too many requests in a short period of time, and a queue-system has been added to avoid this from happening. The lookups may take slightly longer due to this.
  • Progress indicator for directions lookups. Because version 3 of the Google Maps API only allows 10 waypoints in a single request (down from 25 in the previous version), this part is now a bit slower, so a progress indicator is needed.
  • Tuning of the solver code based on faster browsers becoming more common. This should improve the quality of the solutions for cases with more than 15 locations.

Please help me solve any bugs that you may encounter by posting a comment on this site. Information that will be helpful when locating the bug includes:

  • Browser (with version if possible)
  • List of addresses or locations and a description of how to reproduce the bug
  • The output that you see (error message, why you think the solution is wrong etc.)
]]>
https://gebweb.net/blogpost/2011/06/03/optimap-for-google-maps-v3-released/feed/ 86
Japan Radiation Map https://gebweb.net/blogpost/2011/03/17/japan-radiation-map/ https://gebweb.net/blogpost/2011/03/17/japan-radiation-map/#comments Thu, 17 Mar 2011 10:23:28 +0000 http://gebweb.net/blogpost/2011/03/17/japan-radiation-map/ Continue reading »]]> Japan Radiation Map at 2011-03-17 18:40:00 Japan local time

I’ve created a map which shows the measured radiation values in Japan (note that this map is no longer online – the rest of this post is out of date). The data is scraped (credits go to Marian Steinbach) every 10 minutes (hit refresh to get the newest data). You can also click on each measurement location to see a chart of the measurements from that station over time.

Chart of historical values

Currently, there are about 200 measurement stations, but I’m having trouble finding the latitude and longitude of each measurement station. I’m sure someone who knows Japanese would have more luck…Anyway, I’m slowly working my way through the list of measurement stations, so more locations will be added continously. Any help with this would be much appreciated. Feedback and criticism is welcome, and should be added as comments to this page.

Update 2011-03-20: With the help of volunteer “hosoyamane”, a Japanese translation of the map is now available. It’s great to see volunteers pop up so fast!

Update 2011-03-20: A small spike in radiation is showing up in the stations in the Ibaraki prefecture around 10 am Japan local time this morning. However, the levels are still low (1000 nano-Gray is still 2000 times less than the average yearly dose of background radiation).

Update: The original radiation map I created is no longer maintained. Instead, users are redirected to a map created by the Institute of Information Design of Japan.

]]>
https://gebweb.net/blogpost/2011/03/17/japan-radiation-map/feed/ 28