ramone
Member level 3
- Joined
- Oct 5, 2003
- Messages
- 58
- Helped
- 1
- Reputation
- 2
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Patras University
- Activity points
- 721
matlab question!
I'm facing problems trying to implement an algorithm i have been thinking in matlab...
Here's what i want to do...
I have a number of cells(say n cells) (or cities, or points or whatever). The cells are not all connected each other. Some cells are connected with some neighbor cells but no one else. I know the connections. What i want to do is to:
CREATE a MATRIX where i will have ALL POSSIBLE SUBSETS S\subseteq{1,2,..n} of size s (where s changes from s=3 to s=n) and CONTAINIG cell 1.
so suppose the grid
| 13 | 14 | 15 | 16 |
| 9 | 10 | 11 | 12 |
| 5 | 6 | 7 | 8 |
| 1 | 2 | 3 | 4 |
one man starts from cell 1. The connected cells are the neighbor ones(that means 1-2,1-5,2-6,2-3,2-1,...,11-15,11-12,...). I want to know all possible subsets he may do for
subset_length=3,4,...,16 . All the subsets must have as initial cell the cell=1.
If anyone can help please do so!
I'm facing problems trying to implement an algorithm i have been thinking in matlab...
Here's what i want to do...
I have a number of cells(say n cells) (or cities, or points or whatever). The cells are not all connected each other. Some cells are connected with some neighbor cells but no one else. I know the connections. What i want to do is to:
CREATE a MATRIX where i will have ALL POSSIBLE SUBSETS S\subseteq{1,2,..n} of size s (where s changes from s=3 to s=n) and CONTAINIG cell 1.
so suppose the grid
| 13 | 14 | 15 | 16 |
| 9 | 10 | 11 | 12 |
| 5 | 6 | 7 | 8 |
| 1 | 2 | 3 | 4 |
one man starts from cell 1. The connected cells are the neighbor ones(that means 1-2,1-5,2-6,2-3,2-1,...,11-15,11-12,...). I want to know all possible subsets he may do for
subset_length=3,4,...,16 . All the subsets must have as initial cell the cell=1.
If anyone can help please do so!