MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

List-Selection

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20021] List-Selection
  • From: kewjoi at hixnet.co.za (Kew Joinery)
  • Date: Sat, 25 Sep 1999 02:40:46 -0400
  • References: <37B0476C.426FF2C@hixnet.co.za>
  • Sender: owner-wri-mathgroup at wolfram.com

Hello everyone,
The item FastList-Selection (finding 7 consecutive elements) was solved
efficiently. Is there a way to do so for slightly different task?
Given matrix m(32x6)  , find exactly 7 elements(rows) to satisfy the condition:
Union[Flatten[some 7 rows of m]] = = Range[32]

Note: each number NEVER happens to be twice in same row or column!
Here is some matrix (satisfying the Note):


{{1,2,4,8,16,32},{2,1,3,7,15,31},{3,4,2,6,14,30},{4,3,1,5,13,29},{5,6,8,4,12,
    28},{6,5,7,3,11,27},{7,8,6,2,10,26},{8,7,5,1,9,25},{9,10,12,16,8,24},{10,
    9,11,15,7,23},{11,12,10,14,6,22},{12,11,9,13,5,21},{13,14,16,12,4,20},{14,
    13,15,11,3,19},{15,16,14,10,2,18},{16,15,13,9,1,17},{17,18,20,24,32,16},{
    18,17,19,23,31,15},{19,20,18,22,30,14},{20,19,17,21,29,13},{21,22,24,20,
    28,12},{22,21,23,19,27,11},{23,24,22,18,26,10},{24,23,21,17,25,9},{25,26,
    28,32,24,8},{26,25,27,31,23,7},{27,28,26,30,22,6},{28,27,25,29,21,5},{29,
    30,32,28,20,4},{30,29,31,27,19,3},{31,32,30,26,18,2},{32,31,29,25,17,1}}

Thank you for your attention .
Eugene



  • Prev by Date: Plot3D Problem with Nonreal Numbers
  • Next by Date: NotebookPrint versus File->Print
  • Previous by thread: Re: Plot3D Problem with Nonreal Numbers
  • Next by thread: Re: List-Selection