# Could casting multiple "Star Swirl's unfinished spells" solve the Magical Mystery cure

In Magical Mystery Cure (S03E13) an unfinished Star Swirl's spell causes the Elements of Harmony to swap color. In the remainder of the episode Twilight Sparkle aims to restore the damage by convincing the Mane Six back to their original special talent.

Mathematics learns however that for a given permutation (swap), if the permutation has no memory (cannot inspect the state of the objects, nor knows it has already been applied a certain amount of times), by repeating the permutation a maximum of n times (with n the number of elements), one gets back to the original state of the objects.

The question is: is there any evidence that repeatedly casting an unfinished Star Swirl's spell could restore the damage, and why - given Twilight is exceptionally smart - did Twilight not choose this option?

– user1027
Commented Apr 10, 2015 at 14:08
• @Keen: is it possible to store the comments in such chatroom, looks like it is still useful though to have some reference... Commented Apr 10, 2015 at 14:18
• While this is certainly not an answer, know that you are not the only one who questioned that option. See here for a fan comic that is just about that idea. Commented Sep 29, 2015 at 6:47

tl;dr: We just don't know what the spell would have done; Twilight Sparkle chose to take the safe route rather than risk using demonstrably-dangerous magic again.

As far as I know, the one and only time this spell is seen or referenced is the one time it was cast, since it was fixed immediately afterwards. So, that single test case is the only information we have about it's effects. All we know is that the spell causes the Elements to change colors, which cause the ponies to swap cutie marks.

To start with, there's two ways the color swap could be achieved:

1. The spell performs some algorithmic permutation on the Elements, based on criteria we don't know.
2. The spell assigns each element a new color"at random".

The latter case is easy: each time the spell is cast there is exactly the same odds of it putting everything back to normal, which is `1/5!` or 1 in 120. Those are kinda bad odds already, but it gets even worse when you consider the implications of repeatedly casting things, as I explain further down.

(Note: even though there are 6 Elements of Harmony, Twilight's didn't change, so we only have 5 to fix).

In the former, there's a least a chance your idea might work, but we don't know. How stable the permutation process it is depends on what parameters are taken into account when deciding where each mark goes next. If the permutation is cyclical, as you point out (e.g. they always go from pink -> blue -> orange, or balloon -> lightning -> diamond) then yes, just re-doing the process enough times should fix it. But it could be more complex: does it depends on which pony happens to have which element? Does it depend on the combination of shape and color? Can we construct an algorithm that does the swap deterministically for any given state, but has a cycle in it? (I suspect we could but I haven't tried) If so, we could recast the spell an infinite number of times and never make progress.

However, even if we assume best-case that casting 5 more times would fix things, there's some issues with this idea:

• Casting the spell wrought havoc as everyone struggled to conform to their "new" destiny.
• Casting the spell did not take effect immediately: nothing happened until the next morning. That means casting the spell and waiting a whole day (during which there will be the above havoc).
• We're assuming that casting the spell again will do the same thing: the spell's incomplete, so we just don't know.
• We're also assuming that fixing the Elements will fix the cutie marks. That seems a pretty reasonable assumption, but again, it's broken magic, so who knows?

Overall, it seems like Twilight, with her knowledge of magic, and intelligence in general, would be the person most likely to know if casting the spell again is a good idea. This is particularly true given that Spike recommends trying a counter-spell and Twilight rejects the idea: if the spell were it's own counterspell, surely she would have picked up on that.

Rather, she seems to have taken the safer and more reliable route: just fix the damage directly, and don't risk casting a dangerous half-finished spell any more times.

Options

• it would have to commutate - and there is no evidence of that with magic, with the nature of cutie marks, or the nature of true selves.
• a number of starswirls spells can only be cast once by the same pony
• we have no evidence that twilight knows combinatorics
• twilight may have gotten (very) lucky in that hers changed into .... hers. if she cast the spell again, she might receive another mark, and forget her magic.
• there is no evidence for, and there is some against starswirl using the elements of harmony in his spell.

it is I teresting to see that the true self was retained though hidden while cutie marks were lost. this happened with Torak (sp?) as well. they retained self even when cutie mark was lost.