ack! simple partitioning problem making my head swim....
- To: mathgroup at smc.vnet.net
- Subject: [mg42050] ack! simple partitioning problem making my head swim....
- From: a_cjones at hotmail.com (cdj)
- Date: Tue, 17 Jun 2003 05:43:45 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi all,
I'm given 2 (ordered) lists - list1 has elements a_1,..a_n, and list2
has elements b_1,...,b_n.
As efficiently as possible, I want to determine whether or not these
lists represent matrices that can be multiplied together. In list
format, I'm imagining that "a list represents a matrix" means simply:
the 1st row of the matrix are the first list entries, the second row
comes next, and so on (just as in the Mathematica command
Flatten[{{1,2},{3,4}}] = {1,2,3,4}.
(a) It's clear enough that finding a solution to this problem is gonna
involve comparing the factors in the lengths of the two lists, but
then it all goes wishywashy in my head. lil help?
(b) Assume there does exist a way of partitioning the two input lists
so that they form "multiplicatively-friendly" matrices. Is this
guaranteed to be unique? Or is it possible that there be *several*
ways to partition given lists into m-friendly matrices?
thanks a bunch for any insights,
cdj
- Follow-Ups:
- Re: ack! simple partitioning problem making my head swim....
- From: Tomas Garza <tgarza01@prodigy.net.mx>
- Re: ack! simple partitioning problem making my head swim....