So there’s this neat game called Set.
If you’ve never come across the game, the basic idea is that you have 12 cards each with 4 different attributes with 3 possible values of each attribute.
Color: Red Purple Green
Shape: Diamond, Oval, Squiggly
Number: 1 2 3
Fill-Type: Solid/Filled, Clear, Lined/Striped

Your goal is to find a set of 3 cards that agree or disagree on each of the attributes.
The link provided above has visual examples.
You can play a 2 player flash version at www.highergames.com

Here at emad nerdotronics labs, we went ahead and automated the process.
Here is the source: http://blag.thegrebs.com/setsolve.py.html.
It is pretty straight forward and there are no suprises.
Of course there are a number of issues we can all scream about, which is great, because the world needs more screaming.

from Practicality:
—-This is completely useless in versions of the game where each set is removed as it is found and three new cards replace it. —-
Yes. For that you would just have to change a few ways the search is made. for instance. stop at the first one found, erase the 3 found cards, append the 3 new cards, search again. As you can see, that wouldnt take much effort to do with what I already have.

—-Isn’t this game a brain teaser? What’s the point of automating it? Isn’t this ju– oh ok i just read the category of this posting. —-
Apology Accepted.

from Coding Methodology:
—-Youshould totally use a dictionary to print out the actual color, shape, filltype of the card found in a non mnemonic way. —-
Yes, just change two things and you can do that.

—-Why not just use an array of attributes and loop through those during the card comparison, it would totally be cooler! —-
yeah, I thought of that, but I figured I might as well keep a little more self documenting. It is very much do-able, though


So check this. Whenever I saw my favorite wacky super-villian hanging out, he’s often comfortably at home in his very own abandoned amusement park. Since you people are not super-villians, here is a link depicting a real life version of such a place. One that you will never live in!
http://home.f01.itscom.net/spiral/t_rando/t_rando1.html


Forget your family and forget your “uncle sam”
I need you!!

you.jpg needs you to google juice his way to the top. And he can only do it with his fans!
Kindly place a link named you to http://zork.net/~spork/you.jpg on your website. If
you do not have a real website, then put it in your blog, blag, online journal, web diary or whatever you kids are calling it these days.

<a href=http://zork.net/~spork/you.jpg>you</a>

^– use that code! You do not need to use it for every link, just put it somewhere!


I need help solving: 2+2
Sure just use your calculator!
What? what’s that thing?
Oh, its an electronic device that uses a small processor to perform arithmetical functions.
processor? what are you talking about?
look! you press some buttons and they produc–
start me from the beginning

Ok, first, an introduction to some simple logic gates.

The not gate is to be considered an inverter. It accepts one input and produces
one output. If it takes in a low voltage, it outputs to a high voltage. If it takes in
a high voltage, it outputs a low voltage.

In Out
0 1
1 0

The and gate is a gate which requires two inputs and produces one output. It is
used to check if both inputs are high, i.e. the first input AND the second
input are high. If the first input is high and the second input is high, the
output will be high. For all other cases, the output is low. Lets state these
other cases just for the record. The first input is low and the second input is
low, the output is low. The first input is high and the second input is low,
the output is low. The first input is low and the second input is high, the
output is low.

Input1 Input2 Out
0 0 0
0 1 0
1 0 0
1 1 1

The or gate is another gate which requires two inputs and produces one output.
It is used to determine if one or both of the inputs is high, i.e. the first
input OR the second input is high. If the first input is high and the second
input is high, the output is high. If the first input is low and the second
input is high, the output is high. If the first input is high and the second
input is low, the output is high. If the first input is low and the second
input is low, the output is low. From this we can see that and OR gate will
only produce a low output if both the inputs are low. For all other cases it
will output a high voltage.

Input1 Input2 Out
0 0 0
0 1 1
1 0 1
1 1 1

This is in contrast to our next gate. The XOR gate is known as exclusive or.
This gate is used to determine if one and only one of the inputs is high.
Meaning, either the first input or the second input needs to be high, but not
both! So, if the first input is low and the second input is low, the output is
low. If the first input is high and the second input is low, the output is
high. If the first input is low and the second input is high, the output is
high. If the first input is high and the second input is high, the output is
low.

Input1 Input2 Out
0 0 0
0 1 1
1 0 1
1 1 0

From these we can develop a system that will add. Initially we will start off
with a half adder. By combining a XOR gate and an AND gate, we can produce a
small circuit that — what? you want to know how to make these gates?

sigh alright, the inverter can be made a couple ways.
I’d suggest using an inverting amplifier with Rf equal to
R1. That way Vout is equal to -Vin. Oh that
is from the equation \LARGE{ \frac{V_{out}}{V_{in}} = -\frac{R_f}{R_1} }
Here take a look at this picture:

Yeah that’s a feedback setup so we can control the gain, thats how the two
resistors come into play.

Now for the AND gate, you can use a circuit made of transistors or one made of
diodes.
— what? are you serious? I have to explain transistors, diodes, and op-amps to
you now?!–

Ok the ideal op-amp is described by a few particular characteristics. You have
infinite voltage gain, infinite input impedance, zero output impedence,
infinite bandwidth, and if you input zero you get zero out, they call it zero input
offset voltage. — ideal vs. real? ok that’s a valid question but its not
really worth asking —

— what? how do you know anything about Mosfets!? are kidding me? dude, I’m not
going into semiconductor level design here! seriously! back off!

Thats it, no more! I’m not answering any more of your questions! At this rate
I’ll need to explain any number of subjects eventually ending up at trying to
explain theoretical physics! OUT! no more!
You’ve got some nerve…


Ok, I no longer need the python script I previously posted about. MikeGarb has provided the server with LaTeX and has also pointed me to http://www.sixthform.info/steve/wordpress/ which provides a LaTeX plugin for the blag software. In exchange for hits in generating the equation image, I can do this:

\sum_{i=k}^{l} a_{i}
x_n^2 = n_1 + n_2
\lim_{n \rightarrow \infty} a_{n} = \ell
f(x,y) = \frac{x}{1 + y}
N_E R^D

Stay tuned for a post about the binomial theorem with no detail!


0-201-19912-2
Rule of Sum:

If a first task can be perfromed in m ways while a second can be performed in n ways and the two tasks cannot be performed simultaneously then: performing either task can be accomplished in any one of m + n ways.

Rule of Product:

If a procedure can be broken down into first and secon stages and if there are m possible outcomes for the first stage and if, for each of these outcomes, there are n possible outcomes for the second stage, then the total procedure can be carried out in the designated order in mn ways.

Permutations

If there are n distinct objects, denoted a1a2…an and r is an integer with 1 ≤ rn, then by the rule of product, the number of permutations of size r for the n objects is:
P(n,r) = n ⋅ (n-1) ⋅ (n-2) ⋅ … ⋅ (n-r+1) = n!/(n-r)!

note: here no repetitions are allowed. If repetitions had been allowed, nr using the rule of product
note: if using all then r=n and P(n,n) = n!

If there are n objects with n1 of a first type, n2 type … and nr of an rth type where n1 + n2 + … + nr = n then there are: n!/(n1!n2!…nr!) linear arrangements of the given n objects.
ex: PEPPER

note: here objects of the same type are indistinguishable
note: for a circular arrangemnt (like position around a table) fix A the top point and solve by seating the rest.

n choose r
If we start with n distinct objects, each selection or combination of r of these objects with no reference to order corresponds to r! premutations of size r from a collection of size denoted C(n,r) where 0 ≤ r ≤ n satisfies r! ⋅ C(n,r) = P(n,r) and

C(n,r) = P(n,r)/r! = n!/(r!(n-r)! 0 ≤ r ≤ n

C(n,0) = 1 for all n ≥ 0
C(n,r) = C(n,n-r)


OK, this blag is nice and setup. Tshirts will go on sale soon. Help keep this site running by sending money via pay pal!