<html><head></head><body><div class="ydpe683d128yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;"><div></div>
        <div>Thanks to Kristofer for doing this extra work to sort out the error and apologies to Etjon for the result it caused!</div><div><br></div><div>Toby</div><div><br></div>
        
        <div id="ydpe683d128yahoo_quoted_1946867732" class="ydpe683d128yahoo_quoted">
            <div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
                
                <div>
                        On Wednesday, 17 June 2026 at 22:03:13 BST, Etjon Basha <etjonbasha@gmail.com> wrote:
                    </div>
                    <div><br></div>
                    <div><br></div>
                
                
                <div><div id="ydpe683d128yiv6118367402"><div><div>Boo!</div><br clear="none"><div id="ydpe683d128yiv6118367402yqt68748" class="ydpe683d128yiv6118367402yqt0092689017"><div class="ydpe683d128yiv6118367402gmail_quote ydpe683d128yiv6118367402gmail_quote_container"><div dir="ltr" class="ydpe683d128yiv6118367402gmail_attr">On Thu, 18 June 2026, 12:28 am Kristofer Munsterhjelm, <<a shape="rect" href="mailto:km-elmet@munsterhjelm.no" rel="nofollow" target="_blank">km-elmet@munsterhjelm.no</a>> wrote:<br clear="none"></div><blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;" class="ydpe683d128yiv6118367402gmail_quote">On 2026-06-02 23:11, Toby Pereira wrote:<br clear="none">
> I see yes, thanks. In that case, Schulze STV seems to do pretty <br clear="none">
> terribly, not just a bit worse than other STV methods. And looking at <br clear="none">
> your whole list, considerably worse than things like (Bloc) Borda! It's <br clear="none">
> definitely not broken in your simulation?<br clear="none">
<br clear="none">
I added some tests to Schulze STV and found an election where quadelect <br clear="none">
would return the wrong outcome.<br clear="none">
<br clear="none">
The bug appears to have been caused by undefined behavior in Schulze's <br clear="none">
own code, where a line does something that has no clear order of <br clear="none">
execution, and different compilers resolve the ambiguity differently. I <br clear="none">
tested Schulze's prog01 compiled with a modern gcc and got the same bug.<br clear="none">
<br clear="none">
After fixing the bug, I tested the example elections referenced in <br clear="none">
"Implementing the Schulze STV Method"[1], table 2, and the Schulze STV <br clear="none">
code used by my simulator now gives the correct outcome - i.e. the ones <br clear="none">
listed in the paper - for all of them.<br clear="none">
<br clear="none">
I then ran my multiwinner simulations and got much better results. <br clear="none">
Sorry, Etjon :-)<br clear="none">
<br clear="none">
Droop spatial proportionality:<br clear="none">
<br clear="none">
Two seats, 10 candidates, 14400 elections:<br clear="none">
<br clear="none">
Name           Droop goodness-of-fit VSE<br clear="none">
Meek/Warren    0.7932<br clear="none">
Harmonic (S-L) 0.9254<br clear="none">
Schulze STV    0.9997<br clear="none">
<br clear="none">
Three seats:<br clear="none">
<br clear="none">
Warren         0.8712<br clear="none">
Meek           0.8713<br clear="none">
Harmonic (S-L) 0.8925<br clear="none">
Schulze STV    0.9992<br clear="none">
<br clear="none">
Four seats:<br clear="none">
<br clear="none">
Harmonic (S-L) 0.8880<br clear="none">
Warren         0.9184<br clear="none">
Meek           0.9185<br clear="none">
Schulze STV    0.9954<br clear="none">
<br clear="none">
Five seats:<br clear="none">
<br clear="none">
Harmonic (S-L) 0.8809<br clear="none">
Warren         0.9426<br clear="none">
Meek           0.9428<br clear="none">
Schulze STV    0.9874<br clear="none">
<br clear="none">
Six seats:<br clear="none">
<br clear="none">
Harmonic (S-L) 0.8779<br clear="none">
Meek           0.9598<br clear="none">
Warren         0.9598<br clear="none">
Schulze STV    0.9758<br clear="none">
<br clear="none">
Nine seats:<br clear="none">
<br clear="none">
Harmonic (S-L) 0.9450<br clear="none">
Schulze STV    0.9497<br clear="none">
Meek           0.9979<br clear="none">
Warren         0.9980<br clear="none">
<br clear="none">
<br clear="none">
The quantile fits for two out of ten are (288k elections):<br clear="none">
<br clear="none">
Name           Prop. quantile    Goodness-of-fit VSE<br clear="none">
Schulze STV    0.3377            0.9961<br clear="none">
Harmonic (S-L) 0.3498            0.9223<br clear="none">
Meek/Warren    0.3344            0.8090<br clear="none">
<br clear="none">
and for the 2-of-4 CFC-Kemeny comparison (5760 elections):<br clear="none">
<br clear="none">
Name           Prop. quantile    Goodness-of-fit VSE<br clear="none">
Harmonic (S-L) 0.3317            0.9414<br clear="none">
Meek/Warren    0.3321            0.9602<br clear="none">
Schulze STV    0.3345            0.9989<br clear="none">
CFC-Kemeny     0.2493            0.9998<br clear="none">
<br clear="none">
as well as 2-of-5 (7200 elections):<br clear="none">
<br clear="none">
Name           Prop. quantile    Goodness-of-fit VSE<br clear="none">
Meek/Warren    0.3346            0.9208<br clear="none">
Harmonic (S-L) 0.3383            0.9294<br clear="none">
CFC-Kemeny     0.2441            0.9967<br clear="none">
Schulze STV    0.3371            0.9967<br clear="none">
<br clear="none">
So Schulze STV seems to be pretty good, but its margin over other <br clear="none">
methods shrinks as seats/candidates ratio increases, to the point where <br clear="none">
Meek and Warren beats it with nine seats.<br clear="none">
<br clear="none">
Perhaps this has something to do with how Schulze STV's main calculation <br clear="none">
is on sets that differ by one candidate, that it then uses widest path <br clear="none">
to extrapolate; if there are more winners, such paths may have more <br clear="none">
steps. But I don't know for sure.<br clear="none">
<br clear="none">
I also found a few crash-inducing memory access bugs in Schulze's <br clear="none">
implementation, but the code is difficult enough to understand that I'm <br clear="none">
unsure how to fix them. I'll probably give more details in another post.<br clear="none">
<br clear="none">
-km<br clear="none">
<br clear="none">
[1] <br clear="none">
<a shape="rect" href="https://sites.math.duke.edu/~bray/Courses/49s/Additional%20Reading/Schulze/Schulze3/schulze3.pdf" rel="nofollow" target="_blank">https://sites.math.duke.edu/~bray/Courses/49s/Additional%20Reading/Schulze/Schulze3/schulze3.pdf</a><br clear="none">
</blockquote></div></div>
</div></div></div>
            </div>
        </div></div></body></html>