This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's TI-BASIC subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. TI-Basic Brain Teasers => TI-BASIC
Author Message
thornahawk
μολών λαβέ


Active Member


Joined: 27 Mar 2005
Posts: 569

Posted: 22 Jun 2007 04:41:30 am    Post subject:

I suppose there's been a shortage of challenges, 'ne? ;)

Anyway, here's a nice little challenge:

You are given a permutation matrix represented as a row index list. For instance:

[url="http://www.forkosh.dreamhost.com/mimetex.cgi?\left({\begin{array}0&1&0&0\\0&0&0&1\\0&0&1&0\\1&0&0&0\\\end{array}}\right)"]click to view image[/url]

would be represented as {2,4,3,1}.

The challenge is that, without using matrices, write a program that takes the row index list as input and outputs the column index list. For the example above, the output should be {4,1,3,2} .

thornahawk
Back to top
Weregoose
Authentic INTJ


Super Elite (Last Title)


Joined: 25 Nov 2004
Posts: 3976

Posted: 22 Jun 2007 08:55:54 am    Post subject:

Spoiler wrote:
[font="courier new;font-size:9pt;line-height:100%;color:darkblue"]Ans→R
seq(I,I,1,dim(Ans→C
SortA(LR,LC
LC


Last edited by Guest on 23 Jun 2007 07:28:47 pm; edited 1 time in total
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement