Blogs

The Allocation problem, assigning students to sessions

This is a challenge to blog readers to come up with (or find examples in practice) of good systems to allocate students to parallel sessions based on their preferences. I've just concluded one round of this, and the bidding system I built worked OK, but is not perfect.

The problem: Around 80 students. On 10 days over 4 weeks they will be split into 3-5 different parallel sessions on those days. Many sessions have a cap on the number of students, and more students will have them as a 1st choice than can fit. Some sessions can take many students and won't fill up. The students can express their preference as ranking, or with numeric values.

This is known in the literature as the Allocation problem, and there are various approaches, though none I found seemed to fit just right, either being easy to code or having existing running code. But I am keen on pointers.

The goals:

  • Maximize student satisfaction/minimize disappointment. Giving a student their 1st choice is good. Giving 3rd or 4th choices is bad.
  • The system must be easy for the students to understand and use.
  • Fairness. This has many meanings, but ideally mismatches that can't be avoided should be distributed. If somebody gets a 4th choice one day, they perhaps should have a better shot at a 1st choice on another day.
  • It's nice if there's a means of applying penalties to students who violate rules, sneak into sessions etc. Academic violations can result in less chance at getting your 1st choice.
  • It should be flexible. Sessions may have to be changed or many not fully finalize until a week before the session.
  • It is nice to handle quirks, like duplicated sessions a student takes only once, but where the student might have preferences for one of the instances over another. There may also be pre-requisites, so only students who take one session can have the sequel.
  • Things change and manual tweaking can be advised.

Rank sessions in order, 1st come, 1st served

This was used in the prior year. Much like a traditional sign-up sheet in some ways, students could indicate their choices in order. If more students had a session as 1st choice than would fit, the ones who filled out their form first got in. This gave priority over all 10 days and so it was changed to rotate each week to distribute who was first in line.

Topic: 

Robocar legality in Nevada, Germany and more news

A wrapup of robocar news from the past couple of weeks:

Nevada governor Brian Sandoval rides in Google Car

After Nevada's recent legislation directing their DOT to explore legal operations for robocars in the state, the governor "took the wheel" of a Google car. Very positive impressions from the governor and DMV head.

Topic: 

A solar panel on a robocar

I often see people say they would like to see solar panels on electric cars, inspired by the solar-electric cars in the challenge races, and by the idea that the solar panel will provide some recharging for the car while it is running and without need to plug it in.

It turns out this isn't a tremendously good idea for a variety of reasons:

Canada has a giant zombie in it

I discovered this year that something I've seen a zillion times, the standard map of Canada, features a giant, brain-eating zombie. I'm naming the zombie "Hudson" because that's the Bay that makes up most of him. He's a plump undead with stubby legs, a big blank eye (Price Charles Island,) and a slack jaw, and it looks like Newfoundland is in trouble.

Topic: 

Car users frustrated with their tech

The latest JD Power survey on car satisfaction has a very new complaint that has now the second most annoying item to new car owners namely problems with the voice recognition system in their hands-free interface. This is not too surprising, since voice recognition, especially in cars, is often dreadful. It also reveals that most new tech has lots of UI problems -- not every product is the iPod, lauded from the start for its UI.

Robocar projects, laws and other news

An update on the backlog of robocar related news caused by my recent travel and projects:

Nevada law

Many people have noticed the new law recently passed in Nevada which directs the Dept. of Transportation to create guidelines for the introduction of self-driving cars on Nevada roads. Here is the text of the law. Because Google, whom I consult for on robocars, helped instigate this law, I will refrain from comment, other than to repeat what I've said before: I predict that most transportation innovation will take place in robocars because they will be built from the ground up and bought by early adopters. The government need merely get out of the way and do very basic facilitation. This is very different from things like PRT and new transit lines, which require the government's active participation and funding.

You'll find lots of commentary on the story in major news media.

Volkswagen announces simple self-driving car

Topic: 

The efficacy of trusted traveler programs

A new paper on trusted traveler programs from RAND Corp goes into some detailed math analysis of various approaches to a trusted traveler program. In such a program, you pre-screen some people, and those who pass go into a trusted line where they receive a lesser security check. The resources saved in the lesser check are applied to give all other passengers a better security check. This was the eventual goal of the failed CLEAR card -- though while it operated it just got you to the front of the line, it didn't reduce your security check.

The analysis shows that with a "spherical horse" there are situations where the TT program could reduce the number of terrorists making it through security with some weapon, though it concludes the benefit is often minor, and sometimes negative. I say spherical horse because they have to idealize the security checks in their model, just declaring that an approach has an X% chance of catching a weapon, and that this chance increases when you spend more money and decreases when you spend less, though it has diminishing returns since you can't get better than 100% no matter what you spend.

The authors know this assumption is risky. Turns out there is a form of security check which does match this model, which is random intense checking. There the percentage of weapons caught is pretty closely tied with the frequency of the random check. The TTs would just get a lower probability of random check. However, very few people seem to be proposing this model. The real approaches you see involve things like the TTs not having to take their shoes off, or somehow bypassing or reducing one of the specific elements of the security process compared to the public. I believe these approaches negate the positive results in the Rand study.

This is important because while the paper puts a focus on whether TT programs can get better security for the same dollar, the reality is I think a big motive for the TT approach is not more security, but placation of the wealthy and the frequent flyer. We all hate security and the TSA, and the airlines want to give better service and even the TSA wants to be hated a bit less. When a grandmother or 10 year old girl gets a security pat down, it is politically bad, even though it is the right security procedure. Letting important passengers get a less intrusive search has value to the airlines and the powerful, and not doing intrusive searches that seem stupid to the public has political value to the TSA as well.

We already have such a program, and it's not just the bypass of the nudatrons (X ray scanners) that has been won by members of congress and airline pilots. It's called private air travel. People with their own planes can board without security at all for them or their guests. They could fly their planes into buildings if they wished, though most are not as big as the airliners from 9/11. Fortunately, the chance that the captains of industry who fly these planes would do this is tiny, so they fly without the TSA. The bypass for pilots seems to make a lot of sense at first blush -- why search a pilot for a weapon she might use to take control of the plane? The reality is that giving a pass to the pilots means the bad guy's problem changes from getting a weapon through the X-ray to creating fake pilot ID. It seems the latter might actually be easier than the former.

Back from Botswana, I want better audio for my video

This blog has been silent the last month because I've been on an amazing trip to Botswana and a few other places. There will be full reports and lots of pictures later, but today's idea comes from experiments in shooting HD video using my Canon 5D Mark II. As many people know, while the 5D is an SLR designed for stills, it also shoots better HD video than all but the most expensive pro video cameras, so I did a bit of experimenting

The internal mic in the camera is not very good, and picks up not just wind but every little noise on the camera, including the noises of the image stabilizer found in many longer lenses. I brought a higher quality mic that mounts on the camera, but it wasn't always mounted because it gets a little in the way of both regular shooting and putting the camera away. When I used it, I got decent audio, but I also got audio of my companion and our guide rustling or shooting stills with their own cameras. To shoot a real video with audio I had to have everybody be silent. This is why much of the sound you see in nature documentaries is actually added later, and very often just created by Foley artists. I also forgot to turn on my external mic, which requires a small amount of power, a few times. That was just me being stupid -- as the small battery lasts for 300 hours I could have just left it on the whole trip. (Another fault I had with the mic, the Sennheiser MKE 400, was that the foam wind sleeve kept coming off, and after a few times I finally lost it.)

Topic: 

Terminal mode or a standard mounting port for mobile phones in cars?

It's very common to use mobile phones for driving activities today. Many people even put in cell phone holders in their cars when they want to use the phones as navigation systems as well as make calls over a bluetooth. There's even evidence that dashboard mounting reduces the distracted driving phenomenon associated with phones in cars.

Selling empty middle seats by dutch auction

I have written before about letting passengers pay for an empty middle seat next to them and recently about ANZ's cuddle class and related programs which partially implement this.

While I believe airlines could sell the empty middle for somewhere in the range of 30-40% of a regular ticket, this still has issues. In particular, are they really going to bump a poor standby passenger who had a cancelled flight and make them stay another night so that people can get a more comfortable seat?

One idea is to allow the sale of empty middles by dutch auction. In effect this would say, "If there are going to be empty middles on this plane, those who bid the most will get to sit next to them." If this can be done, it's a goldmine of extra revenue for the airline. What they sell costs them nothing -- they are just selling the distribution of passengers on the plane. If the plane fills up, however, they sell it all and nobody is charged.

The dutch auction approach would let each passenger make an offer. If there are 5 empty middles, then the 10 people who sit next to them win, but they all pay the 10th highest bid price. If only 9 passengers bid, the 10th highest price is zero, and everybody pays zero -- which is what happens today, except it's semi-random. While this may seem like a loss for the airline, many game theory tests suggest that dutch auctions often bring the best result, as they make both sides happy, and people bid more, knowing they will actually pay the fair price if they win.

(On the other hand, airlines are masters at having two people pay vastly different prices for exactly the same thing and have managed to avoid too much resentment over it.)

There is one huge problem to solve: How do you arrange that matched bidders are sitting together to share the empty middle? Each empty middle benefits two passengers.

Google Robocars at TED, Shanghai bubble cars, Robot Week, lives saved

Here's a few Robocar updates.

First of all, the TED talk given by Sebastian Thrun, leader of the Google self-driving car team (disclaimer: they are a consulting client) is up on the TED web site. This is one of the short TED talks, so he does not get to go into a lot of depth, but notable is one of the first public showings of video of the Google car in action on ordinary city streets. (The first was at PodCarCity, but video was not made available on the web.)

Topic: 

Guide to a meeting room based videoconference with Skype

If you're going to have a meeting with people in a meeting room and one or more people calling in remotely, I recommend trying to have a remote multi-party video call, or at the very least a high-fidelity audio call, and avoid the traditional use of a phone conference bridge to a speakerphone on the meeting room table. The reality is the remote people never feel part of the meeting, and no matter how expensive the speakerphone, the audio just doesn't cut it. There are several tools that can do a multi-party video call, including Oovoo, Sightspeed, Vsee and others, but for now I recommend Skype because it's high quality, cheap, encrypted and already ubiquitous.

While you can just set up the meeting room with Skype on a typical laptop, it's worth a bit of extra effort to make things run more smoothly in the meeting room, and to get good audio and video. Here are some steps to take, in rough order of importance.

The Basics

  • You should upgrade to the latest Skype. Use "Help/Check for upgrades" in Skype or download from their web site.
  • Create or designate a "conference master" account. (Skype no longer needs a Premium account for this but calls are limited to 4 hours/day and 100hrs/month.) I also recommend you have some money in the Skype account for outbound calling, see below.
  • The conference master should learn the UI of multi-party calling. They must be on Windows or a Mac. (Sadly, for now, only Windows is recommended.) The UI is slightly different, annoyingly. Read Skype's instructions for windows or Mac. They also have some how-to videos. The hard reality is that the Windows version is more advanced. Don't learn the UI during the conference -- in particular make sure you know how to deal with late callers or re-adding bounced people because it can happen.
  • The conference master should have a decently high-powered PC, especially if having 4 or more remotes.
  • Notify all participants of the name of the conference master. Have them add the conference master to their contact list in advance of the conference. Confirm them as buddies. Alternately, if you know their Skype names, add them and get them to confirm.
  • Create, in advance, a call group for the conference.
  • You may wish to refer the remote callers to my guide to calling in to a multi-party videoconference or a similar document. Send them the master ID when you mail them instructions like these.

The problems

Here are the typical problems that we see if the meeting room just uses a laptop on the table for the video call:

  • The camera is low down on the table, and laptop quality. It often captures backlights and looks up at people. Half the people are blocked from view by other people or stuff on the table.
  • The microphone is at the far end of the table, and it's a cheap laptop mic that picks up sound of its own fan, keyboard and possibly projector. When it sets levels based on the people at that end of the table, it makes the people at the other end hard to hear.
  • You need the sound up loud to hear the remote folks, but then any incoming calls or other computer noises are so loud as to startle people.
  • People haven't tried the interface before, so they fumble and have problems dealing with call setup and adding new callers or returning callers. This frustrates the others in the room, who just want to get on with the meeting.
  • Some folks have to come in by telephone, but you can't really have a speaker phone and a computer conference talking speaker to microphone very well.

Here's how to solve many of these problems:

Getting good audio in the conference room

Topic: 

Guide for remote video participants in a group meeting with Skype

Having a group videoconference, or participating by video in a group meeting (where several people are in a meeting room, and one or more others are coming in via video) is quite useful. It's much better than the traditional audio conference call on a fancy speakerphone. The audio is much better and the video makes a big difference to how engaged the remote parties are in the meeting.

There are many tools, but right now I recommend Skype and Google Hangout which are both free. Hangout does 15 people and Skype 25. You want people using the latest versions.

Topic: 

Review of standalone wand scanner

Back at the start of this blog, in 2004, I described a product I wanted to see, which I called the Paperless Home Scanner. Of late, several companies have been making products like this (not necessarily because of this blog of course) and so I finally picked one up to see how things pan out.

Because I'm cheap, I was able to pick up an asian made scanner sold under many brand names for only $38 on eBay. This scanner sometimes called the Handyscan or PS-4100 or similar numbers, can also be found on amazon for much more.

The product I described is a portable sheetfed scanner which runs on batteries and does not need to be connected to a computer because it just writes to a flash card. This particular scanner isn't that because it's a hand scanner you swipe over your documents. For many years I have used a Visioneer Strobe, which is a slow sheetfed unit that has to be connected to a Windows computer. I found that having to turn the computer on and loading the right software and selecting the directory to scan was a burden. (You don't strictly have to do that but strangely you seem motivated to do so.) The older scanner was not very fast, and suffered a variety of problems, being unable to scan thermal paper receipts (they are so thin it gets confused) and having problems with even slight skew on the documents.

I was interested in the hand-scanner approach because I presumed there had been vast improvements using the laser surface scanning found in mice. I figured a new scanner could do very good registration even if you were uneven in your wanding. Here are some of my observations:

  • While it does a better job of making an undistorted scan than older hand scanners, it is still far from perfect, and any twists or catches can distort the scan, though not that much. Enough that you wouldn't use it to print a copy, but fine for records archiving.
  • It's exactly 8.5" wide. Since it's hard to be exactly straight on any scan, that's an annoyance as you will often drift slightly from a page. A scanner for letter paper should really be about 9" wide. I'll gladly pay the extra for that.
  • Even today with Moore's law it's too slow scanning colour. Often the red light comes on that you are scanning too fast in colour. In B&W it is rare but still can happen. Frankly, by this time we should be able to make things fast and sensitive enough to allow scanning as fast as anybody is likely to do it.
  • While it is nice a small (and thus good for travel,) for use in the home, I would prefer it be a bit wider so I can get it on to the paper and scan the whole page with no risk of catching on the paper. And yes, there is always a risk of it catching.
  • It also catches on bends and folds in the paper, and so ideally you are holding the paper with one hand somehow and swiping with the other, but of course that is not really easy to do if scanning the whole page.
  • This particular scanner resets every time it turns off. And it resets to colour-300dpi. I wish it just remembered my settings.
  • In spite of what it said, it does not appear to have a monochrome setting, such as bitmap-600dpi or even 300dpi. That turns out to be fine, and even what you want, for records archiving. Sure, why throw away information in this era of cheap storage, I agree. On the other hand if it allows scanning-super-fast it may be worth it. A trick might be to start in grayscale and get levels, and then switch to bitmap/threshold
  • One huge difference with swipe scanners is they don't know where the edges of the paper are. You can scan on a black background and have software crop and straighten, but feeding scanners do that for you because they know where those edges are. Again, having a bit of the background there is fine for archiving bills etc.
  • Overall, I do now realize that not having a view of what I scanned is more of burden than I thought. Particularly if you are thinking of disposing of the document after scanning. Did you get a good scan or not? Though it would add a lot to the cost and size, I now wonder if a very small display screen might be in order.
  • Instead of a display screen, one alternative might be bluetooth, and send the scan image to your smartphone or computer directly. Not required, so you can still scan at-will, but if you have your device with you, you can get a review screen and perhaps some more advanced UI.
  • Indeed, the bluetooth approach would save you the trouble of having to transfer the files, or of having a flash card. (A modest number of megs of internal flash would probably do the job of storing until you can get near the computer.)
  • While it does plug into USB (to read the flash card) that would be a pain if you wanted to scan to screen. Bluetooth is better.

Hand swipe vs. motor fed

Topic: 
Tags: 

Turn-key Democracy

Around the world, revolution has been brewing, and new governments are arising. So often, though, attempts to bring democracy to nations not used to it fail. I don't know how to solve that problem, but I think it might be possible to make these transitions a bit easier, with a bit of modern experience and technology.

What these aspiring new governments and nations could use is a ready-made, and eventually time tested set of principles, procedures, services and people to take the steps to freedom. One that comes with a history, and with the respect of the world, as well as the ability to win the support of the people. I am not the first to suggest this, and there have been projects to prepare draft constitutions for new countries. George Soros has funded one, and one of its constitutions is being considered in Egypt, or so I have heard.

Eventually, I hope that a basic interim constitution could be created which not only is well crafted, but wins the advance support of the global community. This is to say that major nations, or bodies like the U.N. say, "If you follow these principles, really follow them, then your new government will get the recognition of the world as the legitimate new government". This is particularly important with a revolution, or a civil war as we are seeing in Libya. Big nations are coming to the aid of those under attack. But we don't know what sort of government they will create.

Today we assume that a people should self-determine their own constitution, to match their own culture. That is a valid goal, and a constitution just have the support of the vast majority of a people. But the people must also interact with the world, and the government must gain recognition. There are many lessons to be learned from the outside world, including lessons about what not to put in a constitution, even though it matches the local culture. Most new nations still find themselves wracked with sectarian, tribal and geographic divisions, and in this situation, impartial advice and even pressure can be valuable down the road.

Temporary constitution

I believe that each new country needs first an immediate, temporary, minimalist constitution. This constitution would define a transitional government, and put strong time limits on how long it can exist. This constitution would establish the process for creation of the permanent constitution, but also put limits on what can't go in it without a major supermajority vote. Right after a revolution, a new nation may have a huge, but temporary sense of unity and devotion to principle. That devotion will fade as various factions arise and pressure is applied.

The temporary constitution should be minimalist, as should be the government. It should have strong principles of transparency and accountability, because in turbulent times there is often rampant corruption and theft.

It should also, ideally, bring in principles and bodies of law almost word-for-word from other countries. While this is temporary, it provides an immediate body of precedent, and a large body of experts already trained in that nation's law. It isn't that simple of course, since some laws are not meant to be enforced if it is known they are temporary, otherwise people will exploit the expiration.

Possibly the temporary constitution would define an executive with broader power than the permanent one. There may not be the bureaucracy in place to do anything else. It could be that those who serve at the high levels of the transitional government will be barred from standing in elections for some number of years, to assure they really are just there to serve in the transition, and not become new autocrats. This may also be a useful way to make use of the services of the middle echelons of the old regime, who may be the only ones who know how to keep some things running.

Imported, sometimes remote, jurists

If there is some standardization to the system of laws, the new country can import the services of impartial foreign jurists. Some will volunteer and come. Some will come for pay, even though the payment might be deferred until the new country is on its feet. And some might serve remotely, over videoconferencing. Modern telepresence tools might encourage volunteers (or deferred payment workers) to take some time to help a new country get on its feat, providing justice, auditing and oversight.

Holding an election over SMS

In 2004, I described a system that would allow secure voting over an insecure internet and PC. Of late, I have been pondering the question of how to build a "turn-key democracy kit" -- a suite of tools and services that could be used by a newly born democracy to smoothly create a new state. We've seen a surprising number of new states and revolutions in the last few years, and I expect we'll see more.

One likely goal after any revolution is to quickly hold some sort of meaningful election so that it's clear the new regime has popular support and is not just another autocracy replacing the old one. You don't have time to elect a full government (and may not want to due to passions) but at some point you need some sort of government that is accountable to the people to oversee the transition to a stable democracy.

This may create a need for a quick, cheap, simple and reliable election. Even though I am generally quite opposed to the use of voting machines, particularly voting machines which only record results in digital form, there are a number of advantages to digital voting over cell phones and PCs in a new country, at least in a country that has a digital or mobile phone infrastructure established enough so that everybody, even if they don't have a phone, knows someone who has one.

Consider:

  • In a new country, fresh out of autocracy, powerful forces will oppose the election. They will often try to prevent it or block voters.
  • A common technique is intimidation, scaring people away from voting with threats of violence around polling places.
  • The attacks against digital voting systems tend to require both sophistication and advanced planning.
  • For a revolutionary election, the digital voting systems may well be brought in and operated by disinterested foreign parties, backed by the U.N. or other agencies.
  • An electronic system is also immune to problems like boxes of ballots disappearing or being stuffed or altered.

It may be judged that the risks of corruption of a digital or partially digital election may be less than the risks of a traditional polling place election in a volatile area. It may also be hard to build and operate trustable polling places in remote locations, and do it quickly.

The big issue I see is maintaining secret ballot. It is difficult to protect secret ballot with remote voting, and much easier in polling-station voting. If secret ballot is not adequately protected, forces could use intimidation to make sure people vote the right way, or in some cases to buy votes. I am not sure I have a really good solution to this and welcome input; this is an idea in the making.

Erin go Brad -- registering Irish citizenship

It's St. Paddy's day but I can celebrate a little harder this time. Two days ago, I got my notice of entry into Ireland's Foreign Birth Registry, declaring me an Irish citizen. I'm able to do that because I have 3 Irish grandparents (2 born in Ireland.) Irish law declares that anybody born to somebody born in Ireland is automatically Irish. That made my father, whose parents were both born there, an Irish citizen even though he never got a passport. Because my father was an Irish citizen (not born on the Island) that also gives me the right to claim it, though I had to do the paperwork, it is not automatic. If I had children after this, they could also claim it, but if I had any before this registration, they would not.

I decided to do this for a few reasons. First, it will allow me to live, work and travel freely in Ireland or anywhere else in the E.U. The passport control lines for Canadians are not usually that long, but it's nicer to not be quizzed. But in the last few years, I have encountered several situations where it would have been very useful to have a 2nd passport:

  • On a trip to Russia, I discovered there was a visa war between Canada and Russia, and Russia was making Canadians wait 21 days for a Visa while the rest of the world waited 6 or less. I had to change a flight over that and barely made my conference. It would have been handy to use an Irish passport then. (Update: Possibly not. Russia and others require you to use the passport which allows residence, and you must apply where you live. So my Irish documents are no good at the San Francisco consulate as I don't live there using the Irish passport.)
  • Getting stamps in your passport for Israel or its border stations means some other countries won't let you in. Israelis will stamp a piece of paper for you but resent it, and you can lose it. A 2nd passport is a nice solution. (For frequent visitors, I believe Canada and the USA both offer a 2nd passport valid only for travel to Israel.)
  • Described earlier, last year I lost my passport in Berlin. While I got tremendous service in passport replacement, this was only because my mother was in hospital. Otherwise I would have been stuck, unable to travel. With 2 passports, you can keep them in two places, carry one and leave one in the hotel safe etc. While Canada does have an emergency temporary passport, some countries only offer you a travel document to get you home, and you must cancel any other travel on your trip.
  • On entry to Zimbabwe, I found they charged Canadians $75 per entry, while most other nations paid $30 for 1 and $45 for two. Canada is charging Zimbabweans $75 so they reciprocate. Stupid External Affairs, I bet far more Canadians go to Zimbabwe than the other way around
  • On entry to Zambia, it was $50 to transit for most countries but free/no-visa for the Irish. I got my passport 1 week after this, sigh. Ireland has a visa abolition deal.
  • Argentina charges a $150 "reciprocity fee" to US and Canadian passports, good for 10 years. Free for Irish, though. Yay!

All great reasons to have two passports. I don't have that yet, though. (Update: I got it in June) Even though I presume that the vast majority of those who do the Irish foreign birth registry immediately want a passport, it doesn't work that way. After a 21 month wait, I have my FBR certificate, which I now must mail back to the same consulate that sent it, along with several of the same documents I used in getting the FBR like my original birth certificate. While it makes huge sense to do them together, it doesn't work that way.

Pages