- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Let's roll our eyes yes?
let thier be two options and a divice that produces one of two outputs 1/2 of the time. If we map one option to each of the two outputs, we can make a choice.
Now for the hard part.
Let thier be N options, and a device that can produce one of K possibilities with a 1/K probability. Notice that N is not necessarily a factor of K, and vice versa. Let us introduce a second option space. This option Space must have cardinaility that is both a multiple of K and a multiple of N. The simple choice is to multiply N by K. Map each of the original N options to K options in the second option space. Divide the second option map into K sets and associate with each set a distinct output from the device. Let the device work, select the set whose associated output has occured. If its cardinaility is one reverse map the symbol back to your original symbols. Otherwise repeat the division of the selected set by K.
Anyway, I actually thought the the OCR calculator to be a good idea. Though it's implementation can doubtlessly be improved. The Virtual Circuit calculator is a wonder wrapped inside an enema too. I wonder if they'll make a port for java?
Admin
Just use modulo division.
Admin
And there is actually a proof of corectness.
[0, 83613] [1, 83201] [2, 82878] [3, 83669] [4, 83578] [5, 83281] [6, 83505] [7, 83345] [8, 83366] [9, 83528] [10, 83035] [11, 83001]
Admin
I wonder why no finalist article featured the promised static analysis results. Are we supposed to run Coverity ourselves? 8=]
Admin
And here is a nice disproof: [image]
Admin
True, but totally irrelevant for two reasons:
a) The random algorithms don't have guaranteed convergence, but the probability that they converge tends exponentially to 1. This can also be said of Montecarlo algorithms, widely used in the real world.
b) If fixed n is a priority, a good approximation to randomness can be easily constructed. Let's take n=32 to keep the numbers tractable. If we follow an arbitrary a rule to assign coin tosses to zeros and ones, we can construct an unsigned int (x) from 0 to 2^32-1. Since 2^32-1=357913941*12+3, the variable y=MOD(x,12) has the following probability mass function:
f(y)=(357913941+1)/(2^32)=0.08333333348855376244 if y in [0,1,2,3] 357913941/(2^32)=0.08333333325572311878 if y in [4,5,...,11]
Equiprobable enough for most common uses, I think. If not, take a larger n.
Admin
START: Choose 4 random bits (you DO know how to get a bit from a coin, right?).
Concat them into a hex_digit. If hex_digit > 0xB then goto START
now, wasn't that hard?
-dave-
Admin
The real WTF is that certain folk are rushing to prove Savar wrong without reading the replies.
By adding unnecessary and elaborate explanations, proofs and algorithms, these people show how eager they are to restate the obvious over and over again.
It's the same as seeing someone who accidentally pushes a door before reading the "pull" sign, then recite him/her the full definition of the world pull from multiple dictionaries, and taking him on a tour through the door-manufactoring plant. Three times.
Admin
This seemed like a hard choice at first. Then I noticed the balloon from the Universal Calculator saying that it had added my operands, and immidiately I knew what to vote. I literary laughed out loud. Btw, I still don't know what the N button does...
Admin
There were only 12 finalists instead of 300.
Admin
12 sided coin?
[image]ok I know it doesn't have a total of twelve sides, but in the spirit of WTF I propose assigning an entry to each side and ignoring the result if it lands face up or down. Alternately you could just roll the coin along a channel of some sort.
captcha = bling - the original round coin was 80% silver which in todays dollar terms would make it worth nearly 10 times its face value. bling indeed
Admin
Do you like self-patching ASM code? If yes, then too bad (for me) you weren't one of the judges ...
Admin
Was anyone able to make the ORCAL actually work? I couldn't draw anything other than 1s and 7s though sometimes my attempts at an 8 turned into a 0.
Admin
It's got to be the Universal Calculator for me ... the total wackiness (is that a word) of it had me splitting my sides. Full to the brim with WTFs and fruit calculations too ... inspired.
Admin
Admin
Dodecahedron roll it.
Admin
Admin
The English style definition file? Why is that a WTF? What is using English to define a set of rules, instead of a cryptic language a WTF?
Why is it a WTF to allow the user to draw the numbers?
You are right, not many people know how to speak English, and fewer people know how to write.
So far the only WTF I've seen in this particular code is the fact that each rule in the definition file has to be a separate stroke.
Don't get me wrong, this is a WAY cool program. Just like the universal calculator was way cool. But WTF? Hardly. I think only 2 or 3 of the 12 finalists followed the spirit, if not the leter of the contest.
Admin
Admin
CommunityServer 2.0: Now with Virtual Hanging Chads!
Admin
Flip the coin 11 times. Add up the number of heads, vote for finalist #(number of heads + 1).
(This certainly explains why #6 has the highest number of votes...)