December 27, 2007

Vendible gudgeon

vendible (adj.): fit to be offered for sale; "vendible products"

gudgeon (n.):
1. a small, European, freshwater fish, Gobio gobio, of the minnow family, having a threadlike barbel at each corner of the mouth, used as bait.
2. a person who is easily duped or cheated.
3. a bait or allurement.
4. (Nautical) a socket attached to the stern frame of a vessel, for holding the pintle of a rudder.

Hmm, gudgeon was an interesting word today - I could see myself using it, particularly the second definition, some time in the future. Too bad vendible is almost obvious.

"The Megapixel Myth"

For all of you who brag about the extremely high resolutions of your camera, go here - http://www.kenrockwell.com/tech/mpmyth.htm . It is (mainly) true - it's sad how many people buy products based on statistics they don't even bother to think about...

Weird Logic Puzzle #2

See Josh's last post for his second 'logic' puzzle. It's very amusing though, how most 'logic' puzzles are really 'lots of trial and error' problems - and if you don't believe that claim, then a computer should not be able to do this:



public class quick2 {
static String[] words = {"jolly",
"kev",
"log",
"star",
"white",
"mask",
"nut",
"pudding",
"card",
"fun",
"bow",
"cupid",
"fern",
"eve",
"holly",
"sack"};

static boolean[][] bad = new boolean[16][16];
static boolean[] hasE = new boolean[16];
static boolean[] hasH = new boolean[16];
static boolean[] used = new boolean[16];
static int[] quelWord = new int[16];
static int[] quelBlck = new int[16];

public static void main(String[] args){
for(int i=0;i<16;i++){ j="0;j<16;j++)" i="0;i<16;i++){" time =" System.currentTimeMillis();" block="="16){" i="0;i<16;i++){" windex="="12&&block!="15)">0&&block%4!=0) if(bad[wIndex][quelWord[block-1]]) return false;
if(block>3) if(bad[wIndex][quelWord[block-4]]) return false;
if(block>4&&block%4!=0) if(bad[wIndex][quelWord[block-5]]) return false;

//no E's first column or third row!
if(block%4==0&&hasE[wIndex])return false;
if(block/4==2&&hasE[wIndex])return false;

//no H's third row!
if(block/4==2&&hasH[wIndex])return false;

//no logging top row! (-g__g)
if(wIndex==2&&block/4!=0) return false;

//fun 2 columns right holly!
if(wIndex==14&&block%4>=2) return false;
if(wIndex==9&&block<2) windex="="9&&block%4<2)" windex="="9&&(quelWord[block-2]!="14))" windex="="6){" windex="="7){" windex="="10){" windex="="1){" windex="="13){" 4="="block/4)" 4="="block/4)" ohno =" new" i="0;i

This program takes 15 ms to run, which is pretty amazing considering there are 16! ~ 2.1 * 10^13 possible ways to arrange the 16 words in a 4 by 4 table. Luckily, massive pruning comes to the rescue, cutting the time down by a factor of 4*10^7 (assuming originally that the computer would be able to analyze one billion ways per second - a very generous claim). With all the extra constraints Josh put it, it does return the only solution (highlight if you want to see),

nut sack log card
holly eve fun white
pudding star jolly mask
bow kev cupid fern

That's all for today. Another post will be coming soon. Also Artefactual coattail #3 was finally posted - you can find it in the archive.

-squid out

UPDATE:

So okay, Blogger mutilates code. Actually, in a lot of aspects its not the best for blogging math or comp sci. So without further ado, here are the programs and math things I have done so far... in non-blogger format:

http://rekamyenom.googlepages.com/artefactualcoattail1.pdf
http://rekamyenom.googlepages.com/artefactualcoattail2.pdf
http://rekamyenom.googlepages.com/quick.java
http://rekamyenom.googlepages.com/quick2.java

Enjoy!

No comments:

Post a Comment