doubly stochastic matrix calculator Update 2017-07-27
document for function doublStochMat() and jkCheck2() and robinMatrixf()
decimal to fraction calculator decimalFraction ; Unicode
doubly stochastic matrix program code follow next textbook.
The Cauchy-Schwarz Master Class   J. Michael Steele   ★★★★★ ;
This file is personal home work. No one proofread. Cannot promise correctness.
If you suspect any view point wrong, please ask a math expert near by.
Freeman 2009-06-19-10-46
Please use MSIE browser to read this file.
Example ;
α more average and β more diverse both descending order
α seq. α more average α=dsm*β OK 0.688...
β seq. β more diverseβ=dsm*α NO  decimal
RUN 11 ☞ , output 0.9333333333333332
Box11 output doubly stochastic Matrix ; , ,

Box12 doubly stochastic Matrix HTML table ;

α sequence notEqual β sequence, doubly stochastic matrix let α and β equal. α=DSM*β
Box13 ; verify ; ≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ more

Box14

Box15 debug ; debug off, fast output to box11

QBboxc15.value='' ;
document for function doublStochMat() and jkCheck2() and robinMatrixf()





<a name=decimalFraction>
decimal to fraction Box16 input, Box17 output
Another file is better, it has Real number calculator http://freeman2.com/dec2frac.htm
if set answer if find then PI=3.141592653589793 output 22/7
Box16 input ; Box16 input, Box17 output

, , RUN 22 ☞ ☜ decimal only; [ minusEqual ]
Box17 output ; RUN 23 ► ◄ text OK
control Run loop up to max. iteration. max0 default 1000000
panel answer if find accuracy zero6 default .000000
Irrational input need control panel . Rational decimal no need.
QBboxc17.value='' ; stochMat[ ] ; QBspanDrawMat.innerHTML='' ; QBspanAlert1.innerHTML=''
function decimal2fraction(arg1,arg2,arg3) ; function text0to9fraction(in0,arg2)
function doublStochMat( ) ; function d2f()

<a name=UnicodeSymbol>
UnicodeSymbol : ℂ ℍ ℕ ℙ ℚ ℝ ℤ ℽ ℾ ℿ ⅀ ⅅ ⅆ ⅇ ⅈ ⅉ ; × ÷ ° ◦ º ¹ ² ³
≦ ≠ ≧ < = > ± ≡ ≈ ≌ ≒ ∏ ∑ √ ∛ ∜ ∝ → ∞ ∈ ∀ ∂ ⊥ ∃ ∋ ∆ ∇ ⊿ ∟ ∠ ∫ ∬ ∭ ∮ ∥
≺ ≻ ≼ ≽ ≾ ≿ ⊀ ⊁ ≭ ≮ ≯ ≰ ≱ ≲ ≳ ≴ ≵ ≶ ≷ ≸ ≹ ∧ ∨ ∩ ∪ ∴ ∵ ∶ ∷ ⊂ ⊃ ⊄ ⊅ ⊆ ⊇
Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ ΢ Σ Τ Υ Φ Χ Ψ Ω , + - * /
α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω
2017-06-20-20-44 Liu,Hsinhan access en.wikipedia.org
https://en.wikipedia.org/wiki/List_of_mathematical_symbols
en.wikipedia.org-wiki-List_of_mathematical_symbols.htm
∧,⇒,−,∖,√,≥,≤,∓,⋅,⁄,⇔,∈,ℤ,ℝ,φ,π,∑,∫, ,∮,∯,∰,…,⋯,⋮,⋰,⋱,∴,∵,≠
˜ ,∝,∞,■,□,∎,▮,‣,≈,≃,≅,♎,≒,△,≡,≜,≝,≐,↔,≪,≫,≦,≧,≺,≻,◅,▻,→,⊃,⊆
⊂,∩,ℕ,ℚ,⊇,∪,↦,•,⊧,∨,⊢,⟨,⟩,ψ,α,β,–,‖,⌊,⌉,⌋,⌈,ℂ,∗,∣,∤,∥,∦,⋕,⊥
∃,≀,↯,※,⇐,⊕,⊻,∐,′,∀,∂,∉,∌,∋,ℍ,ω,○,∘,∅,ℙ,†,⊤,—,⊗,⋉,⋊,⋈,​,ℵ,ℶ
δ,∆,⊖,Δ,ƒ,∇,∏,σ,

<a name=diversAverag>
Example total treasure=30, member=5, treasure distribution is next
[30,0,0,0,0] ≻ [15,15,0,0,0] ≻ [10,10,10,0,0] ≻ [7.5,7.5,7.5,7.5,0] ≻ [6,6,6,6,6]
most diverse is [30,0,0,0,0] ; most average is [6,6,6,6,6] ; 30+0+0+0+0=6+6+6+6+6

<a name=pictureChar>
Picture characters 册=book (phone book below public telephone) ; 目=eye ; 口=mouth ;
山=∆∆ ; 川=river (bank, streamLine, bank ) ; 田=farm land with walk way ; 門=door
事=event (rope knot record events, top bar is ceiling, vertical bar is rope, two knots on rope )
日=sun ; 月=moon ; 木=tree ; 東=east (sun just rise behind tree ) ; 立=stand ; 見=look,watch
親=parents (a son stand on tree [climb high] look far away expect parents come back)
出=exit,go out (exit from home, one travel mountain after mountain) a606190148
車=car (two wheel hand-push car, top bar and bottom bar are two wheels, vertical bar axis,
middle 田 a place carry cargo. Bird view this car look like 車) ; 艸=grass,weed. a606211119
小=small (a man stand two legs touch, two arms close to legs, smaller space) a606211132
大=big (a man stand two legs wide open, two arms extend out horizontally, bigger space)
太=that is too much ; 人=human ; 巢=nest (tree 木 top nest 田 with three birds ≺≺≺ inside )
弓=bow, a shape of bow ; 引=guide , a bow and an arrow, where arrow goes is a guidance.
凸=convex,jutting ; 凹=concave,hollow ; 串=two object string together ;

<a name="textbook"> (local)
Program http://freeman2.com/jsmajor2.htm
Program http://freeman2.com/dbstochm.htm
use book written by Professor J. Michael Steele
The Cauchy-Schwarz Master Class  ★★★★★
as textbook. Program code is written base on
textbook page 198 to page 201.
Liu,Hsinhan study notes tute0047.htm
http://freeman2.com/tute0047.htm
doubly stochastic matrix program document tute0069.htm
http://freeman2.com/tute0069.htm

<a name="strangePage">
This is a strange page. This page work on off line computer.
This page has error on online computer. Do NOT see
this page as doubly stochastic matrix calculator. See this
page as a strange page try if you can find out why?.
If many other freeman2.com calculator page not work
on your computer. Do not be surprised. They all work fine
before Liu,Hsinhan upload to freeman2.com .
2017-06-13-18-29





<a name="sortnumb">
Sort number not text string
   
Box71 accept only numbers, not name list, not non-number string.
Box 71, input number sequence

Box 72, output answer

This file sort numbers, not for sort text; upsidedown text ok.
2009-07-15-11-18 start sortNumb()
2009-07-15-18-40 done sortNumb()
2009-09-29-20-50 done upsidedown()

<a name="docA001">
2017-06-13-18-36 start 
2017-06-09 Liu, HsinHan paid attention to 
http://freeman2.com/jsmajor2.htm 
jsmajor2.htm work on LiuHH's off line 
computer, but not work on online computer. 
LiuHH decide re-write jsmajor2.htm and 
rename file as 
http://freeman2.com/dbstochm.htm 

<a name="docA002">
function doublStochMat() work on offline 
Acer1 computer. Verify doubly stochastic 
matrix get expected result. Matrix all 
column sum to one, all row sum to one. 
α_vector=doublStochMatrix*β_vector OK. Since 
dbstochm.htm is different from jsmajor2.htm
2017-06-13-16-26 LiuHH take dbstochm.htm 
to online Acer2 computer test run. But 
get all kind errors. 
offline Acer1 computer work correctly 
 online Acer2 computer get all kind errors.
<a name="docA003">
WHY? LiuHH do not expect to debug in short 
time. Is it trouble only in Acer2 computer ?
Is it trouble only in offline Acer1 computer ?
Is it trouble in whole world user's computer ?
LiuHH do not know !!
Upload dbstochm.htm as a strange file, 
NOT as a doubly stochastic matrix calculator 
Hope someone find out why. 
If many other freeman2.com calculator page 
not work on reader's computer. Do not be 
surprised. They all work fine before LiuHH 
upload to freeman2.com . 
2017-06-13-18-56

<a name="docA004"> Update 2017-06-17 
2017-06-16-21-16 
Update 2017-06-17 added Box15 debug checkbox. 
Default no debug output, allow faster answer.
Update 2017-06-17 added Date/Time stamp below 
HTML table. Look like next line. 
doublStochMat() Date/Time: 2017-06-16-21-14-31.700, elapse=0.002 sec.
Update 2017-06-17 move strange page message to 
[a name="strangePage"]
Update 2017-06-17 deleted useless javascript 
functions. Before LiuHH upload, Update 2017-06-17 
work correctly in offline Acer1 computer.
2017-06-16-21-24 

<a name="docA005"> 
2017-06-19-19-29 
Update 2017-06-20 added decimal to fraction 
calculator change 0.0754716981132076 to 4/53 .
Update 2017-06-20 added 0.688... decimal
allow doubly stochastic matrix calculator 
output both decimal and fraction. 
2017-06-19-19-38

<a name="docA006"> 
2017-06-21-09-00
Update 2017-06-21 
change quotient to fraction
change Quotient to Fraction
At first, Liu,Hsinhan refer to ℂ ℍ ℕ ℙ ℚ ℝ ℤ
in which ℚ=integer1/integer2 decide use quotient.
Later find out the translation 
[[
106,06,20,17,54
C:\$fm\math\mathterm\mterm007.txt
商	quotient

C:\$fm\math\mathterm\mterm004.txt
分數;分式	fraction
]]
and find online use "decimal to fraction calculator" 
2017-06-21 decide change to correct term.
2017-06-21-09-05

<a name="docA007"> 
2017-07-11-14-51 
Update 2017-07-12 added example  button. If 
α8 = [2.5, 2.4, 1.5, 1.5, 0.1]
β8 = [3.0, 2.6, 1.2, 1.0, 0.2]
both α8 and β8 have five elements, 
both α8 and β8 have total sum 8. These 
two condition do NOT grantee majorization 
relation that is α8⊀β8 and α8⊁β8 . Because 
require 3.0+2.6+1.2+1.0 ≧ 2.5+2.4+1.5+1.5 
but 7.8 ≧ 7.9 is not true.
If switch α β role and define 
α9 = [3.0, 2.6, 1.2, 1.0, 0.2]
β9 = [2.5, 2.4, 1.5, 1.5, 0.1]
first element fail. Because require 
2.5 ≧ 3.0 , but 2.5 ≧ 3.0 is not true.

Update 2017-07-12 added link 
document for function doublStochMat() and 
jkCheck2() and robinMatrixf() 
2017-07-11-15-43

<a name="docA008"> 
2017-07-12-15-04
Update 2017-07-12 modified 
function decimal2fraction()
2017-07-12-11-40 
use α=[ 5 2.5 2.25 1.25 1] 
use β=[ 6  2   2    2   0] 
fraction output, 2/1029 become 3/1029, 
verify doubly stochastic matrix fail

Update 2017-07-12 change from 
parseInt(i0*aa+addone) 
to parseInt(n2)+addone 
Because 
parseInt(1.9999999999999997)=1   
parseInt(1.99999999999999997)=2
n0=parseInt(i0*aa+addone) OK //addone=1
n0=parseInt(i0*aa+addone) ERROR ! 
Blue code use addone help, 
red  code use addone damage answer. 
See 
http://freeman2.com/dec2frac.htm#docF031b
for more explanation.
2017-07-12-15-12

<a name="docA009"> 
2017-07-15-19-15
Update 2017-07-16 has minor change, move  
to  and use errorAlert().
Update 2017-07-16 uploaded Chinese version 
http://freeman2.com/dbstoch1.htm
2017-07-15-19-20

<a name="docA010"> 
2017-07-27-18-10
Update 2017-07-27 change function bye09() error. 
error code line change to new a607211645 line.
//if(nine0<0)nine0--; // negative integer minus one
if(in09<0)nine0--; //a607211645 
After correction, program change -0.99999999999
to -1 . (Error code change to +1)
2017-07-27-18-13

[=][][]


Javascript index
http://freeman2.com/jsindex2.htm   local
Save graph code to same folder as htm files.
http://freeman2.com/jsgraph2.js   local


File name jsmajor2.htm means
JavaScript MAJORization English (2)

doubly stochastic matrix : 雙隨機(矩)陣 //a606131521

Majorization transformation between two sequences.
http://freeman2.com/jsmajor2.htm
First Upload 2010-06-29

Chinese version doubly stochastic matrix calculator
均化矩陣計算器 First Upload 2017-07-16
http://freeman2.com/dbstoch1.htm

This page
doubly stochastic matrix calculator
http://freeman2.com/dbstochm.htm
First Upload 2017-06-13
(related material see tute0047.htm)

Thank you for visiting Freeman's page. 
Freeman Liu,HsinHan 劉鑫漢 2017-06-13-19-04

Another similar page
http://freeman2.com/dbstochn.htm
turn on all debug code output for writing
http://freeman2.com/tute0069.htm