## 535 Reputation

17 years, 42 days

## Invalid sequence error...

@Carl Love So, I tried to use both and they are both giving me an error. I can't figure out why. I've attached the worksheets. TreeToPrüfer.mw Download PrüferToTree.mw

## Thanks!...

@Carl Love I have never used heap before. You've motivated me to learn more about it. I particularly like your statistical analysis of the TreeToPrufer code. It is rather efficient. Much appreciated!

## Thanks...

@Carl Love I'll use lprint.

## Thanks...

@Carl Love  I've used that approach before. I find it strange that solve ignores assumptions.

## Sorry...

@Carl Love I completely missed your response. This does what I need. Thanks!

## Simpler...

@acer This ended up being much simpler than I was making it. Thanks! I'll have a look the the ArrayTool:-BlockCopy command.

## Thanks!...

@dharr This is perfect! Thank you!

## Perfect!...

@Carl Love As always, when I get an answer to a question here, I often learn a lot more than I expected to. Thanks much!

## Sorry...

@acer Sorry about the ambiguity, I was thinking the former. Would it matter, though?

## Complement?...

@acer Supposing we have a universal set of all reals, could this method be adapted to work with complements? For example, how could I do the intersection of the complement of A and B?

## Perfect!...

@acer Thanks so much. Just what I needed!

## Perfect...

@Kitonum This is exactly what I needed. Thanks!

## I was looking at the wrong package......

@rlopez Okay, it appears I was looking at the wrong package. This is exactly what I was looking for! Thanks!

## Perfect......

@tomleslie Just what I was looking for. Thank you!

## On the contrary......

@tomleslie A path is a walk in which no vertices are repeated. So, with regard to your example, an undirected graph with three vertices would have a longest path of length 2: A-B-C, C-A-B, etc. For a cycle, only the initial and terminal vertices are allowed to be the same. Again, from your example, a couple cycles are C-A-B-C, A-C-B-A, all of length 3. Hope this clarifies my question.

 1 2 3 4 5 6 7 Page 2 of 7
﻿