GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 23-May-2006, 18:11
Knight81 Knight81 is offline
New Member
 
Join Date: May 2006
Posts: 20
Knight81 is on a distinguished road
Post

Latin square


Can anyone suggest a method to generate 'recursively' a Latin square of size n.

Eg of Laint square of size n=3

123
231
312

Please advise.
  #2  
Old 23-May-2006, 20:38
dsmith's Avatar
dsmith dsmith is offline
Senior Member
 
Join Date: Jan 2004
Location: Utah, USA
Posts: 1,351
dsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of lightdsmith is a glorious beacon of light

Re: Latin square


Brute force is the easy way - but I am sure there is a more elegant way.

It seems that you can just check your previous "rows" and "columns" until you find a number that would fit.
  #3  
Old 23-May-2006, 21:18
dabigmooish's Avatar
dabigmooish dabigmooish is offline
Member
 
Join Date: May 2004
Location: Baltimore (middle of Canton)
Posts: 165
dabigmooish will become famous soon enough

Re: Latin square


You can go here for every possible Magic Square (Latin Square is a type of magic square) formula you'll ever need. Once you get a formula, you should be able to make a recursive function out of it easily.
__________________
"To argue with a person who has renounced the use of reason is like administering medicine to the dead."
-Thomas Paine
www.sullivan-county.com/deism.htm
  #4  
Old 10-Oct-2007, 13:10
ocelot99 ocelot99 is offline
New Member
 
Join Date: Oct 2007
Posts: 1
ocelot99 is on a distinguished road

Re: Latin square


hey. does anyone have a python program for latin squares? I've been trying to make one myself, but I'm making little progress and I'd like an example to see why it's not working. Can anyone help me out?
 
 

Recent GIDBlogToyota - 2008 September Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Magic Square batman3280 Java Forum 8 29-Nov-2007 01:57
Latin square Knight81 C++ Forum 1 23-May-2006 23:14
OT: nth power square root math question earachefl C++ Forum 1 18-Feb-2006 07:45
Convert the input into square yards pjpav Java Forum 1 08-Oct-2005 07:43
Need help with my programs, please help. agentxx04 C Programming Language 1 23-Sep-2004 18:02

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:00.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.