From: Csaba Henk Date: 2005-04-11T10:44:38+09:00 Subject: Re: Translating A Pattern of Data Into Equation, and ultimately code On 2005-04-10, Zach Dennis wrote: > I have the following table of data, and I am looking to create an > equation to recreate the table. If anyone finds this sort of thing fun, > or has a online resource or a good book that helps explaining these > types of math concepts, please take a stab at it or post any info that > might aide me in my discovery! I've been trying the past several hours > and this sort of thing isn't my strong suit...and i'm stuck! > > I am first looking to understand how-to make the pattern of data into a > actual math equation...then from there I'd like to write ruby code for > the equation. > > Here is the sample data in a table: > - rows represent a different character (as labeled) > - columns represent the position of the character > (examples represent data in decimal notation, not octal/hex) > example: "aaaa" would become 000 003 002 005 > example: "zach" would become 027 003 000 012 > > 1 2 3 4 5 6 (etc......) > ---------------------------------------------------- > a 1 | 0 3 2 5 4 7 > b 2 | 3 0 1 6 7 4 > c 3 | 2 1 0 7 6 5 OK I see how you turn "zach" into 027 003 000 012. But not more. Is this table filled with random/real-life data or is there some rule I don't get? What is it exactly that you want an equation for? Do you really want an equation or just an expression? FYI, "x**2 + 2" is an expression, "x**2 + 2 = 13" is an equation (ie., equations are predicative, like "I go fishing tomorrow", expressions are descriptive, like "the picture on the wall". Csaba