哈夫曼树

  • 哈夫曼树
    • 构造方法

哈夫曼树

构造方法

1、首先统计出每种字符出现的频率(概率)或权值
eg:(字符:权重)
A:60 B:45 C:13 D:69 E:14 F:5 G:3
2、找出字符中权重最小的两个,小的在左边,大的在右边,组成二叉树。
最小的是F和G,删除F和G,加入F和G的权重和

#mermaid-svg-Nhplvim6for66hBi .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-Nhplvim6for66hBi .label text{fill:#333}#mermaid-svg-Nhplvim6for66hBi .node rect,#mermaid-svg-Nhplvim6for66hBi .node circle,#mermaid-svg-Nhplvim6for66hBi .node ellipse,#mermaid-svg-Nhplvim6for66hBi .node polygon,#mermaid-svg-Nhplvim6for66hBi .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-Nhplvim6for66hBi .node .label{text-align:center;fill:#333}#mermaid-svg-Nhplvim6for66hBi .node.clickable{cursor:pointer}#mermaid-svg-Nhplvim6for66hBi .arrowheadPath{fill:#333}#mermaid-svg-Nhplvim6for66hBi .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-Nhplvim6for66hBi .flowchart-link{stroke:#333;fill:none}#mermaid-svg-Nhplvim6for66hBi .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-Nhplvim6for66hBi .edgeLabel rect{opacity:0.9}#mermaid-svg-Nhplvim6for66hBi .edgeLabel span{color:#333}#mermaid-svg-Nhplvim6for66hBi .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-Nhplvim6for66hBi .cluster text{fill:#333}#mermaid-svg-Nhplvim6for66hBi div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-Nhplvim6for66hBi .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-Nhplvim6for66hBi text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-Nhplvim6for66hBi .actor-line{stroke:grey}#mermaid-svg-Nhplvim6for66hBi .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-Nhplvim6for66hBi .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-Nhplvim6for66hBi #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-Nhplvim6for66hBi .sequenceNumber{fill:#fff}#mermaid-svg-Nhplvim6for66hBi #sequencenumber{fill:#333}#mermaid-svg-Nhplvim6for66hBi #crosshead path{fill:#333;stroke:#333}#mermaid-svg-Nhplvim6for66hBi .messageText{fill:#333;stroke:#333}#mermaid-svg-Nhplvim6for66hBi .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-Nhplvim6for66hBi .labelText,#mermaid-svg-Nhplvim6for66hBi .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-Nhplvim6for66hBi .loopText,#mermaid-svg-Nhplvim6for66hBi .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-Nhplvim6for66hBi .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-Nhplvim6for66hBi .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-Nhplvim6for66hBi .noteText,#mermaid-svg-Nhplvim6for66hBi .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-Nhplvim6for66hBi .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-Nhplvim6for66hBi .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-Nhplvim6for66hBi .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-Nhplvim6for66hBi .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .section{stroke:none;opacity:0.2}#mermaid-svg-Nhplvim6for66hBi .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-Nhplvim6for66hBi .section2{fill:#fff400}#mermaid-svg-Nhplvim6for66hBi .section1,#mermaid-svg-Nhplvim6for66hBi .section3{fill:#fff;opacity:0.2}#mermaid-svg-Nhplvim6for66hBi .sectionTitle0{fill:#333}#mermaid-svg-Nhplvim6for66hBi .sectionTitle1{fill:#333}#mermaid-svg-Nhplvim6for66hBi .sectionTitle2{fill:#333}#mermaid-svg-Nhplvim6for66hBi .sectionTitle3{fill:#333}#mermaid-svg-Nhplvim6for66hBi .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-Nhplvim6for66hBi .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .grid path{stroke-width:0}#mermaid-svg-Nhplvim6for66hBi .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-Nhplvim6for66hBi .task{stroke-width:2}#mermaid-svg-Nhplvim6for66hBi .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .taskText:not([font-size]){font-size:11px}#mermaid-svg-Nhplvim6for66hBi .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-Nhplvim6for66hBi .task.clickable{cursor:pointer}#mermaid-svg-Nhplvim6for66hBi .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Nhplvim6for66hBi .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Nhplvim6for66hBi .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-Nhplvim6for66hBi .taskText0,#mermaid-svg-Nhplvim6for66hBi .taskText1,#mermaid-svg-Nhplvim6for66hBi .taskText2,#mermaid-svg-Nhplvim6for66hBi .taskText3{fill:#fff}#mermaid-svg-Nhplvim6for66hBi .task0,#mermaid-svg-Nhplvim6for66hBi .task1,#mermaid-svg-Nhplvim6for66hBi .task2,#mermaid-svg-Nhplvim6for66hBi .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-Nhplvim6for66hBi .taskTextOutside0,#mermaid-svg-Nhplvim6for66hBi .taskTextOutside2{fill:#000}#mermaid-svg-Nhplvim6for66hBi .taskTextOutside1,#mermaid-svg-Nhplvim6for66hBi .taskTextOutside3{fill:#000}#mermaid-svg-Nhplvim6for66hBi .active0,#mermaid-svg-Nhplvim6for66hBi .active1,#mermaid-svg-Nhplvim6for66hBi .active2,#mermaid-svg-Nhplvim6for66hBi .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-Nhplvim6for66hBi .activeText0,#mermaid-svg-Nhplvim6for66hBi .activeText1,#mermaid-svg-Nhplvim6for66hBi .activeText2,#mermaid-svg-Nhplvim6for66hBi .activeText3{fill:#000 !important}#mermaid-svg-Nhplvim6for66hBi .done0,#mermaid-svg-Nhplvim6for66hBi .done1,#mermaid-svg-Nhplvim6for66hBi .done2,#mermaid-svg-Nhplvim6for66hBi .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-Nhplvim6for66hBi .doneText0,#mermaid-svg-Nhplvim6for66hBi .doneText1,#mermaid-svg-Nhplvim6for66hBi .doneText2,#mermaid-svg-Nhplvim6for66hBi .doneText3{fill:#000 !important}#mermaid-svg-Nhplvim6for66hBi .crit0,#mermaid-svg-Nhplvim6for66hBi .crit1,#mermaid-svg-Nhplvim6for66hBi .crit2,#mermaid-svg-Nhplvim6for66hBi .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-Nhplvim6for66hBi .activeCrit0,#mermaid-svg-Nhplvim6for66hBi .activeCrit1,#mermaid-svg-Nhplvim6for66hBi .activeCrit2,#mermaid-svg-Nhplvim6for66hBi .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-Nhplvim6for66hBi .doneCrit0,#mermaid-svg-Nhplvim6for66hBi .doneCrit1,#mermaid-svg-Nhplvim6for66hBi .doneCrit2,#mermaid-svg-Nhplvim6for66hBi .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-Nhplvim6for66hBi .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-Nhplvim6for66hBi .milestoneText{font-style:italic}#mermaid-svg-Nhplvim6for66hBi .doneCritText0,#mermaid-svg-Nhplvim6for66hBi .doneCritText1,#mermaid-svg-Nhplvim6for66hBi .doneCritText2,#mermaid-svg-Nhplvim6for66hBi .doneCritText3{fill:#000 !important}#mermaid-svg-Nhplvim6for66hBi .activeCritText0,#mermaid-svg-Nhplvim6for66hBi .activeCritText1,#mermaid-svg-Nhplvim6for66hBi .activeCritText2,#mermaid-svg-Nhplvim6for66hBi .activeCritText3{fill:#000 !important}#mermaid-svg-Nhplvim6for66hBi .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-Nhplvim6for66hBi g.classGroup text .title{font-weight:bolder}#mermaid-svg-Nhplvim6for66hBi g.clickable{cursor:pointer}#mermaid-svg-Nhplvim6for66hBi g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-Nhplvim6for66hBi g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-Nhplvim6for66hBi .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-Nhplvim6for66hBi .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-Nhplvim6for66hBi .dashed-line{stroke-dasharray:3}#mermaid-svg-Nhplvim6for66hBi #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi .commit-id,#mermaid-svg-Nhplvim6for66hBi .commit-msg,#mermaid-svg-Nhplvim6for66hBi .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-Nhplvim6for66hBi g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-Nhplvim6for66hBi g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-Nhplvim6for66hBi g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-Nhplvim6for66hBi g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-Nhplvim6for66hBi .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-Nhplvim6for66hBi .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-Nhplvim6for66hBi .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-Nhplvim6for66hBi .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-Nhplvim6for66hBi .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-Nhplvim6for66hBi .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-Nhplvim6for66hBi .edgeLabel text{fill:#333}#mermaid-svg-Nhplvim6for66hBi .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-Nhplvim6for66hBi .node circle.state-start{fill:black;stroke:black}#mermaid-svg-Nhplvim6for66hBi .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-Nhplvim6for66hBi #statediagram-barbEnd{fill:#9370db}#mermaid-svg-Nhplvim6for66hBi .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-Nhplvim6for66hBi .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-Nhplvim6for66hBi .statediagram-state .divider{stroke:#9370db}#mermaid-svg-Nhplvim6for66hBi .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-Nhplvim6for66hBi .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-Nhplvim6for66hBi .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-Nhplvim6for66hBi .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-Nhplvim6for66hBi .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-Nhplvim6for66hBi .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-Nhplvim6for66hBi .note-edge{stroke-dasharray:5}#mermaid-svg-Nhplvim6for66hBi .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-Nhplvim6for66hBi .error-icon{fill:#522}#mermaid-svg-Nhplvim6for66hBi .error-text{fill:#522;stroke:#522}#mermaid-svg-Nhplvim6for66hBi .edge-thickness-normal{stroke-width:2px}#mermaid-svg-Nhplvim6for66hBi .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-Nhplvim6for66hBi .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-Nhplvim6for66hBi .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-Nhplvim6for66hBi .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-Nhplvim6for66hBi .marker{fill:#333}#mermaid-svg-Nhplvim6for66hBi .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-Nhplvim6for66hBi {color: rgba(0, 0, 0, 0.75);font: ;}

F
G
FG:8

A:60 B:45 C:13 D:69 E:14 FG:8
3、重复第二步
最小的是FG和C,删除FG和C,加入FG和C的权重和

#mermaid-svg-wix3qbcO8NUzLSHh .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-wix3qbcO8NUzLSHh .label text{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .node rect,#mermaid-svg-wix3qbcO8NUzLSHh .node circle,#mermaid-svg-wix3qbcO8NUzLSHh .node ellipse,#mermaid-svg-wix3qbcO8NUzLSHh .node polygon,#mermaid-svg-wix3qbcO8NUzLSHh .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-wix3qbcO8NUzLSHh .node .label{text-align:center;fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .node.clickable{cursor:pointer}#mermaid-svg-wix3qbcO8NUzLSHh .arrowheadPath{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-wix3qbcO8NUzLSHh .flowchart-link{stroke:#333;fill:none}#mermaid-svg-wix3qbcO8NUzLSHh .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-wix3qbcO8NUzLSHh .edgeLabel rect{opacity:0.9}#mermaid-svg-wix3qbcO8NUzLSHh .edgeLabel span{color:#333}#mermaid-svg-wix3qbcO8NUzLSHh .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-wix3qbcO8NUzLSHh .cluster text{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-wix3qbcO8NUzLSHh .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-wix3qbcO8NUzLSHh text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-wix3qbcO8NUzLSHh .actor-line{stroke:grey}#mermaid-svg-wix3qbcO8NUzLSHh .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-wix3qbcO8NUzLSHh .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-wix3qbcO8NUzLSHh #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-wix3qbcO8NUzLSHh .sequenceNumber{fill:#fff}#mermaid-svg-wix3qbcO8NUzLSHh #sequencenumber{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh #crosshead path{fill:#333;stroke:#333}#mermaid-svg-wix3qbcO8NUzLSHh .messageText{fill:#333;stroke:#333}#mermaid-svg-wix3qbcO8NUzLSHh .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-wix3qbcO8NUzLSHh .labelText,#mermaid-svg-wix3qbcO8NUzLSHh .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-wix3qbcO8NUzLSHh .loopText,#mermaid-svg-wix3qbcO8NUzLSHh .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-wix3qbcO8NUzLSHh .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-wix3qbcO8NUzLSHh .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-wix3qbcO8NUzLSHh .noteText,#mermaid-svg-wix3qbcO8NUzLSHh .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-wix3qbcO8NUzLSHh .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-wix3qbcO8NUzLSHh .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-wix3qbcO8NUzLSHh .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-wix3qbcO8NUzLSHh .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .section{stroke:none;opacity:0.2}#mermaid-svg-wix3qbcO8NUzLSHh .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-wix3qbcO8NUzLSHh .section2{fill:#fff400}#mermaid-svg-wix3qbcO8NUzLSHh .section1,#mermaid-svg-wix3qbcO8NUzLSHh .section3{fill:#fff;opacity:0.2}#mermaid-svg-wix3qbcO8NUzLSHh .sectionTitle0{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .sectionTitle1{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .sectionTitle2{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .sectionTitle3{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-wix3qbcO8NUzLSHh .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .grid path{stroke-width:0}#mermaid-svg-wix3qbcO8NUzLSHh .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-wix3qbcO8NUzLSHh .task{stroke-width:2}#mermaid-svg-wix3qbcO8NUzLSHh .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .taskText:not([font-size]){font-size:11px}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-wix3qbcO8NUzLSHh .task.clickable{cursor:pointer}#mermaid-svg-wix3qbcO8NUzLSHh .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-wix3qbcO8NUzLSHh .taskText0,#mermaid-svg-wix3qbcO8NUzLSHh .taskText1,#mermaid-svg-wix3qbcO8NUzLSHh .taskText2,#mermaid-svg-wix3qbcO8NUzLSHh .taskText3{fill:#fff}#mermaid-svg-wix3qbcO8NUzLSHh .task0,#mermaid-svg-wix3qbcO8NUzLSHh .task1,#mermaid-svg-wix3qbcO8NUzLSHh .task2,#mermaid-svg-wix3qbcO8NUzLSHh .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutside0,#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutside2{fill:#000}#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutside1,#mermaid-svg-wix3qbcO8NUzLSHh .taskTextOutside3{fill:#000}#mermaid-svg-wix3qbcO8NUzLSHh .active0,#mermaid-svg-wix3qbcO8NUzLSHh .active1,#mermaid-svg-wix3qbcO8NUzLSHh .active2,#mermaid-svg-wix3qbcO8NUzLSHh .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-wix3qbcO8NUzLSHh .activeText0,#mermaid-svg-wix3qbcO8NUzLSHh .activeText1,#mermaid-svg-wix3qbcO8NUzLSHh .activeText2,#mermaid-svg-wix3qbcO8NUzLSHh .activeText3{fill:#000 !important}#mermaid-svg-wix3qbcO8NUzLSHh .done0,#mermaid-svg-wix3qbcO8NUzLSHh .done1,#mermaid-svg-wix3qbcO8NUzLSHh .done2,#mermaid-svg-wix3qbcO8NUzLSHh .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-wix3qbcO8NUzLSHh .doneText0,#mermaid-svg-wix3qbcO8NUzLSHh .doneText1,#mermaid-svg-wix3qbcO8NUzLSHh .doneText2,#mermaid-svg-wix3qbcO8NUzLSHh .doneText3{fill:#000 !important}#mermaid-svg-wix3qbcO8NUzLSHh .crit0,#mermaid-svg-wix3qbcO8NUzLSHh .crit1,#mermaid-svg-wix3qbcO8NUzLSHh .crit2,#mermaid-svg-wix3qbcO8NUzLSHh .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-wix3qbcO8NUzLSHh .activeCrit0,#mermaid-svg-wix3qbcO8NUzLSHh .activeCrit1,#mermaid-svg-wix3qbcO8NUzLSHh .activeCrit2,#mermaid-svg-wix3qbcO8NUzLSHh .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-wix3qbcO8NUzLSHh .doneCrit0,#mermaid-svg-wix3qbcO8NUzLSHh .doneCrit1,#mermaid-svg-wix3qbcO8NUzLSHh .doneCrit2,#mermaid-svg-wix3qbcO8NUzLSHh .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-wix3qbcO8NUzLSHh .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-wix3qbcO8NUzLSHh .milestoneText{font-style:italic}#mermaid-svg-wix3qbcO8NUzLSHh .doneCritText0,#mermaid-svg-wix3qbcO8NUzLSHh .doneCritText1,#mermaid-svg-wix3qbcO8NUzLSHh .doneCritText2,#mermaid-svg-wix3qbcO8NUzLSHh .doneCritText3{fill:#000 !important}#mermaid-svg-wix3qbcO8NUzLSHh .activeCritText0,#mermaid-svg-wix3qbcO8NUzLSHh .activeCritText1,#mermaid-svg-wix3qbcO8NUzLSHh .activeCritText2,#mermaid-svg-wix3qbcO8NUzLSHh .activeCritText3{fill:#000 !important}#mermaid-svg-wix3qbcO8NUzLSHh .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-wix3qbcO8NUzLSHh g.classGroup text .title{font-weight:bolder}#mermaid-svg-wix3qbcO8NUzLSHh g.clickable{cursor:pointer}#mermaid-svg-wix3qbcO8NUzLSHh g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-wix3qbcO8NUzLSHh g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-wix3qbcO8NUzLSHh .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-wix3qbcO8NUzLSHh .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-wix3qbcO8NUzLSHh .dashed-line{stroke-dasharray:3}#mermaid-svg-wix3qbcO8NUzLSHh #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh .commit-id,#mermaid-svg-wix3qbcO8NUzLSHh .commit-msg,#mermaid-svg-wix3qbcO8NUzLSHh .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-wix3qbcO8NUzLSHh g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-wix3qbcO8NUzLSHh g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-wix3qbcO8NUzLSHh g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-wix3qbcO8NUzLSHh .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-wix3qbcO8NUzLSHh .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-wix3qbcO8NUzLSHh .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-wix3qbcO8NUzLSHh .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-wix3qbcO8NUzLSHh .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-wix3qbcO8NUzLSHh .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-wix3qbcO8NUzLSHh .edgeLabel text{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-wix3qbcO8NUzLSHh .node circle.state-start{fill:black;stroke:black}#mermaid-svg-wix3qbcO8NUzLSHh .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-wix3qbcO8NUzLSHh #statediagram-barbEnd{fill:#9370db}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-state .divider{stroke:#9370db}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-wix3qbcO8NUzLSHh .note-edge{stroke-dasharray:5}#mermaid-svg-wix3qbcO8NUzLSHh .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-wix3qbcO8NUzLSHh .error-icon{fill:#522}#mermaid-svg-wix3qbcO8NUzLSHh .error-text{fill:#522;stroke:#522}#mermaid-svg-wix3qbcO8NUzLSHh .edge-thickness-normal{stroke-width:2px}#mermaid-svg-wix3qbcO8NUzLSHh .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-wix3qbcO8NUzLSHh .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-wix3qbcO8NUzLSHh .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-wix3qbcO8NUzLSHh .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-wix3qbcO8NUzLSHh .marker{fill:#333}#mermaid-svg-wix3qbcO8NUzLSHh .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-wix3qbcO8NUzLSHh {color: rgba(0, 0, 0, 0.75);font: ;}

FG:8
CFG:21
F
G
C

A:60 B:45 D:69 E:14 CFG:21
继续重复,删除CFG和E,加入CFG和E的权重和

#mermaid-svg-H8ivEbFZmB0mdKwt .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .label text{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .node rect,#mermaid-svg-H8ivEbFZmB0mdKwt .node circle,#mermaid-svg-H8ivEbFZmB0mdKwt .node ellipse,#mermaid-svg-H8ivEbFZmB0mdKwt .node polygon,#mermaid-svg-H8ivEbFZmB0mdKwt .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-H8ivEbFZmB0mdKwt .node .label{text-align:center;fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .node.clickable{cursor:pointer}#mermaid-svg-H8ivEbFZmB0mdKwt .arrowheadPath{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-H8ivEbFZmB0mdKwt .flowchart-link{stroke:#333;fill:none}#mermaid-svg-H8ivEbFZmB0mdKwt .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-H8ivEbFZmB0mdKwt .edgeLabel rect{opacity:0.9}#mermaid-svg-H8ivEbFZmB0mdKwt .edgeLabel span{color:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-H8ivEbFZmB0mdKwt .cluster text{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-H8ivEbFZmB0mdKwt .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-H8ivEbFZmB0mdKwt text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-H8ivEbFZmB0mdKwt .actor-line{stroke:grey}#mermaid-svg-H8ivEbFZmB0mdKwt .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-H8ivEbFZmB0mdKwt #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .sequenceNumber{fill:#fff}#mermaid-svg-H8ivEbFZmB0mdKwt #sequencenumber{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt #crosshead path{fill:#333;stroke:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .messageText{fill:#333;stroke:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-H8ivEbFZmB0mdKwt .labelText,#mermaid-svg-H8ivEbFZmB0mdKwt .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-H8ivEbFZmB0mdKwt .loopText,#mermaid-svg-H8ivEbFZmB0mdKwt .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-H8ivEbFZmB0mdKwt .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-H8ivEbFZmB0mdKwt .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-H8ivEbFZmB0mdKwt .noteText,#mermaid-svg-H8ivEbFZmB0mdKwt .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-H8ivEbFZmB0mdKwt .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-H8ivEbFZmB0mdKwt .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-H8ivEbFZmB0mdKwt .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-H8ivEbFZmB0mdKwt .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .section{stroke:none;opacity:0.2}#mermaid-svg-H8ivEbFZmB0mdKwt .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-H8ivEbFZmB0mdKwt .section2{fill:#fff400}#mermaid-svg-H8ivEbFZmB0mdKwt .section1,#mermaid-svg-H8ivEbFZmB0mdKwt .section3{fill:#fff;opacity:0.2}#mermaid-svg-H8ivEbFZmB0mdKwt .sectionTitle0{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .sectionTitle1{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .sectionTitle2{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .sectionTitle3{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-H8ivEbFZmB0mdKwt .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .grid path{stroke-width:0}#mermaid-svg-H8ivEbFZmB0mdKwt .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-H8ivEbFZmB0mdKwt .task{stroke-width:2}#mermaid-svg-H8ivEbFZmB0mdKwt .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .taskText:not([font-size]){font-size:11px}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-H8ivEbFZmB0mdKwt .task.clickable{cursor:pointer}#mermaid-svg-H8ivEbFZmB0mdKwt .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-H8ivEbFZmB0mdKwt .taskText0,#mermaid-svg-H8ivEbFZmB0mdKwt .taskText1,#mermaid-svg-H8ivEbFZmB0mdKwt .taskText2,#mermaid-svg-H8ivEbFZmB0mdKwt .taskText3{fill:#fff}#mermaid-svg-H8ivEbFZmB0mdKwt .task0,#mermaid-svg-H8ivEbFZmB0mdKwt .task1,#mermaid-svg-H8ivEbFZmB0mdKwt .task2,#mermaid-svg-H8ivEbFZmB0mdKwt .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutside0,#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutside2{fill:#000}#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutside1,#mermaid-svg-H8ivEbFZmB0mdKwt .taskTextOutside3{fill:#000}#mermaid-svg-H8ivEbFZmB0mdKwt .active0,#mermaid-svg-H8ivEbFZmB0mdKwt .active1,#mermaid-svg-H8ivEbFZmB0mdKwt .active2,#mermaid-svg-H8ivEbFZmB0mdKwt .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-H8ivEbFZmB0mdKwt .activeText0,#mermaid-svg-H8ivEbFZmB0mdKwt .activeText1,#mermaid-svg-H8ivEbFZmB0mdKwt .activeText2,#mermaid-svg-H8ivEbFZmB0mdKwt .activeText3{fill:#000 !important}#mermaid-svg-H8ivEbFZmB0mdKwt .done0,#mermaid-svg-H8ivEbFZmB0mdKwt .done1,#mermaid-svg-H8ivEbFZmB0mdKwt .done2,#mermaid-svg-H8ivEbFZmB0mdKwt .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-H8ivEbFZmB0mdKwt .doneText0,#mermaid-svg-H8ivEbFZmB0mdKwt .doneText1,#mermaid-svg-H8ivEbFZmB0mdKwt .doneText2,#mermaid-svg-H8ivEbFZmB0mdKwt .doneText3{fill:#000 !important}#mermaid-svg-H8ivEbFZmB0mdKwt .crit0,#mermaid-svg-H8ivEbFZmB0mdKwt .crit1,#mermaid-svg-H8ivEbFZmB0mdKwt .crit2,#mermaid-svg-H8ivEbFZmB0mdKwt .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-H8ivEbFZmB0mdKwt .activeCrit0,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCrit1,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCrit2,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-H8ivEbFZmB0mdKwt .doneCrit0,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCrit1,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCrit2,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-H8ivEbFZmB0mdKwt .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-H8ivEbFZmB0mdKwt .milestoneText{font-style:italic}#mermaid-svg-H8ivEbFZmB0mdKwt .doneCritText0,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCritText1,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCritText2,#mermaid-svg-H8ivEbFZmB0mdKwt .doneCritText3{fill:#000 !important}#mermaid-svg-H8ivEbFZmB0mdKwt .activeCritText0,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCritText1,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCritText2,#mermaid-svg-H8ivEbFZmB0mdKwt .activeCritText3{fill:#000 !important}#mermaid-svg-H8ivEbFZmB0mdKwt .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-H8ivEbFZmB0mdKwt g.classGroup text .title{font-weight:bolder}#mermaid-svg-H8ivEbFZmB0mdKwt g.clickable{cursor:pointer}#mermaid-svg-H8ivEbFZmB0mdKwt g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-H8ivEbFZmB0mdKwt g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-H8ivEbFZmB0mdKwt .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-H8ivEbFZmB0mdKwt .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-H8ivEbFZmB0mdKwt .dashed-line{stroke-dasharray:3}#mermaid-svg-H8ivEbFZmB0mdKwt #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt .commit-id,#mermaid-svg-H8ivEbFZmB0mdKwt .commit-msg,#mermaid-svg-H8ivEbFZmB0mdKwt .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-H8ivEbFZmB0mdKwt g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-H8ivEbFZmB0mdKwt g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-H8ivEbFZmB0mdKwt g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-H8ivEbFZmB0mdKwt .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-H8ivEbFZmB0mdKwt .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-H8ivEbFZmB0mdKwt .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-H8ivEbFZmB0mdKwt .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-H8ivEbFZmB0mdKwt .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-H8ivEbFZmB0mdKwt .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-H8ivEbFZmB0mdKwt .edgeLabel text{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-H8ivEbFZmB0mdKwt .node circle.state-start{fill:black;stroke:black}#mermaid-svg-H8ivEbFZmB0mdKwt .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-H8ivEbFZmB0mdKwt #statediagram-barbEnd{fill:#9370db}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-state .divider{stroke:#9370db}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-H8ivEbFZmB0mdKwt .note-edge{stroke-dasharray:5}#mermaid-svg-H8ivEbFZmB0mdKwt .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-H8ivEbFZmB0mdKwt .error-icon{fill:#522}#mermaid-svg-H8ivEbFZmB0mdKwt .error-text{fill:#522;stroke:#522}#mermaid-svg-H8ivEbFZmB0mdKwt .edge-thickness-normal{stroke-width:2px}#mermaid-svg-H8ivEbFZmB0mdKwt .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-H8ivEbFZmB0mdKwt .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-H8ivEbFZmB0mdKwt .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-H8ivEbFZmB0mdKwt .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-H8ivEbFZmB0mdKwt .marker{fill:#333}#mermaid-svg-H8ivEbFZmB0mdKwt .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-H8ivEbFZmB0mdKwt {color: rgba(0, 0, 0, 0.75);font: ;}

FG:8
CEFG:35
F
G
C
E
CFG:21

A:60 B:45 D:69 CEFG:35
继续重复,删除CEFG和B,加入CEFG和B的权重和

#mermaid-svg-PWKo4dgJIiU2gMLV .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .label text{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .node rect,#mermaid-svg-PWKo4dgJIiU2gMLV .node circle,#mermaid-svg-PWKo4dgJIiU2gMLV .node ellipse,#mermaid-svg-PWKo4dgJIiU2gMLV .node polygon,#mermaid-svg-PWKo4dgJIiU2gMLV .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-PWKo4dgJIiU2gMLV .node .label{text-align:center;fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .node.clickable{cursor:pointer}#mermaid-svg-PWKo4dgJIiU2gMLV .arrowheadPath{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-PWKo4dgJIiU2gMLV .flowchart-link{stroke:#333;fill:none}#mermaid-svg-PWKo4dgJIiU2gMLV .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-PWKo4dgJIiU2gMLV .edgeLabel rect{opacity:0.9}#mermaid-svg-PWKo4dgJIiU2gMLV .edgeLabel span{color:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-PWKo4dgJIiU2gMLV .cluster text{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-PWKo4dgJIiU2gMLV .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-PWKo4dgJIiU2gMLV text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-PWKo4dgJIiU2gMLV .actor-line{stroke:grey}#mermaid-svg-PWKo4dgJIiU2gMLV .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-PWKo4dgJIiU2gMLV #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .sequenceNumber{fill:#fff}#mermaid-svg-PWKo4dgJIiU2gMLV #sequencenumber{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV #crosshead path{fill:#333;stroke:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .messageText{fill:#333;stroke:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-PWKo4dgJIiU2gMLV .labelText,#mermaid-svg-PWKo4dgJIiU2gMLV .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-PWKo4dgJIiU2gMLV .loopText,#mermaid-svg-PWKo4dgJIiU2gMLV .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-PWKo4dgJIiU2gMLV .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-PWKo4dgJIiU2gMLV .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-PWKo4dgJIiU2gMLV .noteText,#mermaid-svg-PWKo4dgJIiU2gMLV .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-PWKo4dgJIiU2gMLV .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-PWKo4dgJIiU2gMLV .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-PWKo4dgJIiU2gMLV .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-PWKo4dgJIiU2gMLV .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .section{stroke:none;opacity:0.2}#mermaid-svg-PWKo4dgJIiU2gMLV .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-PWKo4dgJIiU2gMLV .section2{fill:#fff400}#mermaid-svg-PWKo4dgJIiU2gMLV .section1,#mermaid-svg-PWKo4dgJIiU2gMLV .section3{fill:#fff;opacity:0.2}#mermaid-svg-PWKo4dgJIiU2gMLV .sectionTitle0{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .sectionTitle1{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .sectionTitle2{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .sectionTitle3{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-PWKo4dgJIiU2gMLV .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .grid path{stroke-width:0}#mermaid-svg-PWKo4dgJIiU2gMLV .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-PWKo4dgJIiU2gMLV .task{stroke-width:2}#mermaid-svg-PWKo4dgJIiU2gMLV .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .taskText:not([font-size]){font-size:11px}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-PWKo4dgJIiU2gMLV .task.clickable{cursor:pointer}#mermaid-svg-PWKo4dgJIiU2gMLV .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-PWKo4dgJIiU2gMLV .taskText0,#mermaid-svg-PWKo4dgJIiU2gMLV .taskText1,#mermaid-svg-PWKo4dgJIiU2gMLV .taskText2,#mermaid-svg-PWKo4dgJIiU2gMLV .taskText3{fill:#fff}#mermaid-svg-PWKo4dgJIiU2gMLV .task0,#mermaid-svg-PWKo4dgJIiU2gMLV .task1,#mermaid-svg-PWKo4dgJIiU2gMLV .task2,#mermaid-svg-PWKo4dgJIiU2gMLV .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutside0,#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutside2{fill:#000}#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutside1,#mermaid-svg-PWKo4dgJIiU2gMLV .taskTextOutside3{fill:#000}#mermaid-svg-PWKo4dgJIiU2gMLV .active0,#mermaid-svg-PWKo4dgJIiU2gMLV .active1,#mermaid-svg-PWKo4dgJIiU2gMLV .active2,#mermaid-svg-PWKo4dgJIiU2gMLV .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-PWKo4dgJIiU2gMLV .activeText0,#mermaid-svg-PWKo4dgJIiU2gMLV .activeText1,#mermaid-svg-PWKo4dgJIiU2gMLV .activeText2,#mermaid-svg-PWKo4dgJIiU2gMLV .activeText3{fill:#000 !important}#mermaid-svg-PWKo4dgJIiU2gMLV .done0,#mermaid-svg-PWKo4dgJIiU2gMLV .done1,#mermaid-svg-PWKo4dgJIiU2gMLV .done2,#mermaid-svg-PWKo4dgJIiU2gMLV .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-PWKo4dgJIiU2gMLV .doneText0,#mermaid-svg-PWKo4dgJIiU2gMLV .doneText1,#mermaid-svg-PWKo4dgJIiU2gMLV .doneText2,#mermaid-svg-PWKo4dgJIiU2gMLV .doneText3{fill:#000 !important}#mermaid-svg-PWKo4dgJIiU2gMLV .crit0,#mermaid-svg-PWKo4dgJIiU2gMLV .crit1,#mermaid-svg-PWKo4dgJIiU2gMLV .crit2,#mermaid-svg-PWKo4dgJIiU2gMLV .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-PWKo4dgJIiU2gMLV .activeCrit0,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCrit1,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCrit2,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-PWKo4dgJIiU2gMLV .doneCrit0,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCrit1,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCrit2,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-PWKo4dgJIiU2gMLV .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-PWKo4dgJIiU2gMLV .milestoneText{font-style:italic}#mermaid-svg-PWKo4dgJIiU2gMLV .doneCritText0,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCritText1,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCritText2,#mermaid-svg-PWKo4dgJIiU2gMLV .doneCritText3{fill:#000 !important}#mermaid-svg-PWKo4dgJIiU2gMLV .activeCritText0,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCritText1,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCritText2,#mermaid-svg-PWKo4dgJIiU2gMLV .activeCritText3{fill:#000 !important}#mermaid-svg-PWKo4dgJIiU2gMLV .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-PWKo4dgJIiU2gMLV g.classGroup text .title{font-weight:bolder}#mermaid-svg-PWKo4dgJIiU2gMLV g.clickable{cursor:pointer}#mermaid-svg-PWKo4dgJIiU2gMLV g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-PWKo4dgJIiU2gMLV g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-PWKo4dgJIiU2gMLV .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-PWKo4dgJIiU2gMLV .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-PWKo4dgJIiU2gMLV .dashed-line{stroke-dasharray:3}#mermaid-svg-PWKo4dgJIiU2gMLV #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV .commit-id,#mermaid-svg-PWKo4dgJIiU2gMLV .commit-msg,#mermaid-svg-PWKo4dgJIiU2gMLV .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-PWKo4dgJIiU2gMLV g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-PWKo4dgJIiU2gMLV g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-PWKo4dgJIiU2gMLV g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-PWKo4dgJIiU2gMLV .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-PWKo4dgJIiU2gMLV .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-PWKo4dgJIiU2gMLV .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-PWKo4dgJIiU2gMLV .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-PWKo4dgJIiU2gMLV .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-PWKo4dgJIiU2gMLV .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-PWKo4dgJIiU2gMLV .edgeLabel text{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-PWKo4dgJIiU2gMLV .node circle.state-start{fill:black;stroke:black}#mermaid-svg-PWKo4dgJIiU2gMLV .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-PWKo4dgJIiU2gMLV #statediagram-barbEnd{fill:#9370db}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-state .divider{stroke:#9370db}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-PWKo4dgJIiU2gMLV .note-edge{stroke-dasharray:5}#mermaid-svg-PWKo4dgJIiU2gMLV .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-PWKo4dgJIiU2gMLV .error-icon{fill:#522}#mermaid-svg-PWKo4dgJIiU2gMLV .error-text{fill:#522;stroke:#522}#mermaid-svg-PWKo4dgJIiU2gMLV .edge-thickness-normal{stroke-width:2px}#mermaid-svg-PWKo4dgJIiU2gMLV .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-PWKo4dgJIiU2gMLV .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-PWKo4dgJIiU2gMLV .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-PWKo4dgJIiU2gMLV .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-PWKo4dgJIiU2gMLV .marker{fill:#333}#mermaid-svg-PWKo4dgJIiU2gMLV .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-PWKo4dgJIiU2gMLV {color: rgba(0, 0, 0, 0.75);font: ;}

FG:8
CEFG:35
BCEFG:80
F
G
C
E
B
CFG:21

A:60 D:69 BCEFG:80
继续重复,删除A和D,加入A和D的权重和

#mermaid-svg-HXlHDEYPIi1PdNBs .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .label text{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .node rect,#mermaid-svg-HXlHDEYPIi1PdNBs .node circle,#mermaid-svg-HXlHDEYPIi1PdNBs .node ellipse,#mermaid-svg-HXlHDEYPIi1PdNBs .node polygon,#mermaid-svg-HXlHDEYPIi1PdNBs .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-HXlHDEYPIi1PdNBs .node .label{text-align:center;fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .node.clickable{cursor:pointer}#mermaid-svg-HXlHDEYPIi1PdNBs .arrowheadPath{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-HXlHDEYPIi1PdNBs .flowchart-link{stroke:#333;fill:none}#mermaid-svg-HXlHDEYPIi1PdNBs .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-HXlHDEYPIi1PdNBs .edgeLabel rect{opacity:0.9}#mermaid-svg-HXlHDEYPIi1PdNBs .edgeLabel span{color:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-HXlHDEYPIi1PdNBs .cluster text{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-HXlHDEYPIi1PdNBs .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-HXlHDEYPIi1PdNBs text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-HXlHDEYPIi1PdNBs .actor-line{stroke:grey}#mermaid-svg-HXlHDEYPIi1PdNBs .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-HXlHDEYPIi1PdNBs #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .sequenceNumber{fill:#fff}#mermaid-svg-HXlHDEYPIi1PdNBs #sequencenumber{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs #crosshead path{fill:#333;stroke:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .messageText{fill:#333;stroke:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-HXlHDEYPIi1PdNBs .labelText,#mermaid-svg-HXlHDEYPIi1PdNBs .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-HXlHDEYPIi1PdNBs .loopText,#mermaid-svg-HXlHDEYPIi1PdNBs .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-HXlHDEYPIi1PdNBs .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-HXlHDEYPIi1PdNBs .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-HXlHDEYPIi1PdNBs .noteText,#mermaid-svg-HXlHDEYPIi1PdNBs .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-HXlHDEYPIi1PdNBs .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-HXlHDEYPIi1PdNBs .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-HXlHDEYPIi1PdNBs .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-HXlHDEYPIi1PdNBs .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .section{stroke:none;opacity:0.2}#mermaid-svg-HXlHDEYPIi1PdNBs .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-HXlHDEYPIi1PdNBs .section2{fill:#fff400}#mermaid-svg-HXlHDEYPIi1PdNBs .section1,#mermaid-svg-HXlHDEYPIi1PdNBs .section3{fill:#fff;opacity:0.2}#mermaid-svg-HXlHDEYPIi1PdNBs .sectionTitle0{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .sectionTitle1{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .sectionTitle2{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .sectionTitle3{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-HXlHDEYPIi1PdNBs .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .grid path{stroke-width:0}#mermaid-svg-HXlHDEYPIi1PdNBs .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-HXlHDEYPIi1PdNBs .task{stroke-width:2}#mermaid-svg-HXlHDEYPIi1PdNBs .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .taskText:not([font-size]){font-size:11px}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-HXlHDEYPIi1PdNBs .task.clickable{cursor:pointer}#mermaid-svg-HXlHDEYPIi1PdNBs .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-HXlHDEYPIi1PdNBs .taskText0,#mermaid-svg-HXlHDEYPIi1PdNBs .taskText1,#mermaid-svg-HXlHDEYPIi1PdNBs .taskText2,#mermaid-svg-HXlHDEYPIi1PdNBs .taskText3{fill:#fff}#mermaid-svg-HXlHDEYPIi1PdNBs .task0,#mermaid-svg-HXlHDEYPIi1PdNBs .task1,#mermaid-svg-HXlHDEYPIi1PdNBs .task2,#mermaid-svg-HXlHDEYPIi1PdNBs .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutside0,#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutside2{fill:#000}#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutside1,#mermaid-svg-HXlHDEYPIi1PdNBs .taskTextOutside3{fill:#000}#mermaid-svg-HXlHDEYPIi1PdNBs .active0,#mermaid-svg-HXlHDEYPIi1PdNBs .active1,#mermaid-svg-HXlHDEYPIi1PdNBs .active2,#mermaid-svg-HXlHDEYPIi1PdNBs .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-HXlHDEYPIi1PdNBs .activeText0,#mermaid-svg-HXlHDEYPIi1PdNBs .activeText1,#mermaid-svg-HXlHDEYPIi1PdNBs .activeText2,#mermaid-svg-HXlHDEYPIi1PdNBs .activeText3{fill:#000 !important}#mermaid-svg-HXlHDEYPIi1PdNBs .done0,#mermaid-svg-HXlHDEYPIi1PdNBs .done1,#mermaid-svg-HXlHDEYPIi1PdNBs .done2,#mermaid-svg-HXlHDEYPIi1PdNBs .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-HXlHDEYPIi1PdNBs .doneText0,#mermaid-svg-HXlHDEYPIi1PdNBs .doneText1,#mermaid-svg-HXlHDEYPIi1PdNBs .doneText2,#mermaid-svg-HXlHDEYPIi1PdNBs .doneText3{fill:#000 !important}#mermaid-svg-HXlHDEYPIi1PdNBs .crit0,#mermaid-svg-HXlHDEYPIi1PdNBs .crit1,#mermaid-svg-HXlHDEYPIi1PdNBs .crit2,#mermaid-svg-HXlHDEYPIi1PdNBs .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-HXlHDEYPIi1PdNBs .activeCrit0,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCrit1,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCrit2,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-HXlHDEYPIi1PdNBs .doneCrit0,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCrit1,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCrit2,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-HXlHDEYPIi1PdNBs .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-HXlHDEYPIi1PdNBs .milestoneText{font-style:italic}#mermaid-svg-HXlHDEYPIi1PdNBs .doneCritText0,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCritText1,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCritText2,#mermaid-svg-HXlHDEYPIi1PdNBs .doneCritText3{fill:#000 !important}#mermaid-svg-HXlHDEYPIi1PdNBs .activeCritText0,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCritText1,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCritText2,#mermaid-svg-HXlHDEYPIi1PdNBs .activeCritText3{fill:#000 !important}#mermaid-svg-HXlHDEYPIi1PdNBs .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-HXlHDEYPIi1PdNBs g.classGroup text .title{font-weight:bolder}#mermaid-svg-HXlHDEYPIi1PdNBs g.clickable{cursor:pointer}#mermaid-svg-HXlHDEYPIi1PdNBs g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-HXlHDEYPIi1PdNBs g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-HXlHDEYPIi1PdNBs .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-HXlHDEYPIi1PdNBs .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-HXlHDEYPIi1PdNBs .dashed-line{stroke-dasharray:3}#mermaid-svg-HXlHDEYPIi1PdNBs #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs .commit-id,#mermaid-svg-HXlHDEYPIi1PdNBs .commit-msg,#mermaid-svg-HXlHDEYPIi1PdNBs .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-HXlHDEYPIi1PdNBs g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-HXlHDEYPIi1PdNBs g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-HXlHDEYPIi1PdNBs g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-HXlHDEYPIi1PdNBs .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-HXlHDEYPIi1PdNBs .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-HXlHDEYPIi1PdNBs .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-HXlHDEYPIi1PdNBs .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-HXlHDEYPIi1PdNBs .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-HXlHDEYPIi1PdNBs .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-HXlHDEYPIi1PdNBs .edgeLabel text{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-HXlHDEYPIi1PdNBs .node circle.state-start{fill:black;stroke:black}#mermaid-svg-HXlHDEYPIi1PdNBs .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-HXlHDEYPIi1PdNBs #statediagram-barbEnd{fill:#9370db}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-state .divider{stroke:#9370db}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-HXlHDEYPIi1PdNBs .note-edge{stroke-dasharray:5}#mermaid-svg-HXlHDEYPIi1PdNBs .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-HXlHDEYPIi1PdNBs .error-icon{fill:#522}#mermaid-svg-HXlHDEYPIi1PdNBs .error-text{fill:#522;stroke:#522}#mermaid-svg-HXlHDEYPIi1PdNBs .edge-thickness-normal{stroke-width:2px}#mermaid-svg-HXlHDEYPIi1PdNBs .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-HXlHDEYPIi1PdNBs .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-HXlHDEYPIi1PdNBs .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-HXlHDEYPIi1PdNBs .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-HXlHDEYPIi1PdNBs .marker{fill:#333}#mermaid-svg-HXlHDEYPIi1PdNBs .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-HXlHDEYPIi1PdNBs {color: rgba(0, 0, 0, 0.75);font: ;}

FG:8
CEFG:35
BCEFG:80
F
G
C
E
B
CFG:21
A
D
AD:129

AD:129 BCEFG:80
继续重复,删除AD和BCEFG,加入root

#mermaid-svg-QSv6WYACnViH5zdu .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-QSv6WYACnViH5zdu .label text{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .node rect,#mermaid-svg-QSv6WYACnViH5zdu .node circle,#mermaid-svg-QSv6WYACnViH5zdu .node ellipse,#mermaid-svg-QSv6WYACnViH5zdu .node polygon,#mermaid-svg-QSv6WYACnViH5zdu .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-QSv6WYACnViH5zdu .node .label{text-align:center;fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .node.clickable{cursor:pointer}#mermaid-svg-QSv6WYACnViH5zdu .arrowheadPath{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-QSv6WYACnViH5zdu .flowchart-link{stroke:#333;fill:none}#mermaid-svg-QSv6WYACnViH5zdu .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-QSv6WYACnViH5zdu .edgeLabel rect{opacity:0.9}#mermaid-svg-QSv6WYACnViH5zdu .edgeLabel span{color:#333}#mermaid-svg-QSv6WYACnViH5zdu .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-QSv6WYACnViH5zdu .cluster text{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-QSv6WYACnViH5zdu .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-QSv6WYACnViH5zdu text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-QSv6WYACnViH5zdu .actor-line{stroke:grey}#mermaid-svg-QSv6WYACnViH5zdu .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-QSv6WYACnViH5zdu .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-QSv6WYACnViH5zdu #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-QSv6WYACnViH5zdu .sequenceNumber{fill:#fff}#mermaid-svg-QSv6WYACnViH5zdu #sequencenumber{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu #crosshead path{fill:#333;stroke:#333}#mermaid-svg-QSv6WYACnViH5zdu .messageText{fill:#333;stroke:#333}#mermaid-svg-QSv6WYACnViH5zdu .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-QSv6WYACnViH5zdu .labelText,#mermaid-svg-QSv6WYACnViH5zdu .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-QSv6WYACnViH5zdu .loopText,#mermaid-svg-QSv6WYACnViH5zdu .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-QSv6WYACnViH5zdu .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-QSv6WYACnViH5zdu .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-QSv6WYACnViH5zdu .noteText,#mermaid-svg-QSv6WYACnViH5zdu .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-QSv6WYACnViH5zdu .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-QSv6WYACnViH5zdu .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-QSv6WYACnViH5zdu .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-QSv6WYACnViH5zdu .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .section{stroke:none;opacity:0.2}#mermaid-svg-QSv6WYACnViH5zdu .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-QSv6WYACnViH5zdu .section2{fill:#fff400}#mermaid-svg-QSv6WYACnViH5zdu .section1,#mermaid-svg-QSv6WYACnViH5zdu .section3{fill:#fff;opacity:0.2}#mermaid-svg-QSv6WYACnViH5zdu .sectionTitle0{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .sectionTitle1{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .sectionTitle2{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .sectionTitle3{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-QSv6WYACnViH5zdu .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .grid path{stroke-width:0}#mermaid-svg-QSv6WYACnViH5zdu .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-QSv6WYACnViH5zdu .task{stroke-width:2}#mermaid-svg-QSv6WYACnViH5zdu .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .taskText:not([font-size]){font-size:11px}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-QSv6WYACnViH5zdu .task.clickable{cursor:pointer}#mermaid-svg-QSv6WYACnViH5zdu .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-QSv6WYACnViH5zdu .taskText0,#mermaid-svg-QSv6WYACnViH5zdu .taskText1,#mermaid-svg-QSv6WYACnViH5zdu .taskText2,#mermaid-svg-QSv6WYACnViH5zdu .taskText3{fill:#fff}#mermaid-svg-QSv6WYACnViH5zdu .task0,#mermaid-svg-QSv6WYACnViH5zdu .task1,#mermaid-svg-QSv6WYACnViH5zdu .task2,#mermaid-svg-QSv6WYACnViH5zdu .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutside0,#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutside2{fill:#000}#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutside1,#mermaid-svg-QSv6WYACnViH5zdu .taskTextOutside3{fill:#000}#mermaid-svg-QSv6WYACnViH5zdu .active0,#mermaid-svg-QSv6WYACnViH5zdu .active1,#mermaid-svg-QSv6WYACnViH5zdu .active2,#mermaid-svg-QSv6WYACnViH5zdu .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-QSv6WYACnViH5zdu .activeText0,#mermaid-svg-QSv6WYACnViH5zdu .activeText1,#mermaid-svg-QSv6WYACnViH5zdu .activeText2,#mermaid-svg-QSv6WYACnViH5zdu .activeText3{fill:#000 !important}#mermaid-svg-QSv6WYACnViH5zdu .done0,#mermaid-svg-QSv6WYACnViH5zdu .done1,#mermaid-svg-QSv6WYACnViH5zdu .done2,#mermaid-svg-QSv6WYACnViH5zdu .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-QSv6WYACnViH5zdu .doneText0,#mermaid-svg-QSv6WYACnViH5zdu .doneText1,#mermaid-svg-QSv6WYACnViH5zdu .doneText2,#mermaid-svg-QSv6WYACnViH5zdu .doneText3{fill:#000 !important}#mermaid-svg-QSv6WYACnViH5zdu .crit0,#mermaid-svg-QSv6WYACnViH5zdu .crit1,#mermaid-svg-QSv6WYACnViH5zdu .crit2,#mermaid-svg-QSv6WYACnViH5zdu .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-QSv6WYACnViH5zdu .activeCrit0,#mermaid-svg-QSv6WYACnViH5zdu .activeCrit1,#mermaid-svg-QSv6WYACnViH5zdu .activeCrit2,#mermaid-svg-QSv6WYACnViH5zdu .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-QSv6WYACnViH5zdu .doneCrit0,#mermaid-svg-QSv6WYACnViH5zdu .doneCrit1,#mermaid-svg-QSv6WYACnViH5zdu .doneCrit2,#mermaid-svg-QSv6WYACnViH5zdu .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-QSv6WYACnViH5zdu .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-QSv6WYACnViH5zdu .milestoneText{font-style:italic}#mermaid-svg-QSv6WYACnViH5zdu .doneCritText0,#mermaid-svg-QSv6WYACnViH5zdu .doneCritText1,#mermaid-svg-QSv6WYACnViH5zdu .doneCritText2,#mermaid-svg-QSv6WYACnViH5zdu .doneCritText3{fill:#000 !important}#mermaid-svg-QSv6WYACnViH5zdu .activeCritText0,#mermaid-svg-QSv6WYACnViH5zdu .activeCritText1,#mermaid-svg-QSv6WYACnViH5zdu .activeCritText2,#mermaid-svg-QSv6WYACnViH5zdu .activeCritText3{fill:#000 !important}#mermaid-svg-QSv6WYACnViH5zdu .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-QSv6WYACnViH5zdu g.classGroup text .title{font-weight:bolder}#mermaid-svg-QSv6WYACnViH5zdu g.clickable{cursor:pointer}#mermaid-svg-QSv6WYACnViH5zdu g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-QSv6WYACnViH5zdu g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-QSv6WYACnViH5zdu .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-QSv6WYACnViH5zdu .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-QSv6WYACnViH5zdu .dashed-line{stroke-dasharray:3}#mermaid-svg-QSv6WYACnViH5zdu #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu .commit-id,#mermaid-svg-QSv6WYACnViH5zdu .commit-msg,#mermaid-svg-QSv6WYACnViH5zdu .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-QSv6WYACnViH5zdu g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-QSv6WYACnViH5zdu g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-QSv6WYACnViH5zdu g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-QSv6WYACnViH5zdu .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-QSv6WYACnViH5zdu .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-QSv6WYACnViH5zdu .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-QSv6WYACnViH5zdu .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-QSv6WYACnViH5zdu .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-QSv6WYACnViH5zdu .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-QSv6WYACnViH5zdu .edgeLabel text{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-QSv6WYACnViH5zdu .node circle.state-start{fill:black;stroke:black}#mermaid-svg-QSv6WYACnViH5zdu .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-QSv6WYACnViH5zdu #statediagram-barbEnd{fill:#9370db}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-state .divider{stroke:#9370db}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-QSv6WYACnViH5zdu .note-edge{stroke-dasharray:5}#mermaid-svg-QSv6WYACnViH5zdu .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-QSv6WYACnViH5zdu .error-icon{fill:#522}#mermaid-svg-QSv6WYACnViH5zdu .error-text{fill:#522;stroke:#522}#mermaid-svg-QSv6WYACnViH5zdu .edge-thickness-normal{stroke-width:2px}#mermaid-svg-QSv6WYACnViH5zdu .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-QSv6WYACnViH5zdu .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-QSv6WYACnViH5zdu .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-QSv6WYACnViH5zdu .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-QSv6WYACnViH5zdu .marker{fill:#333}#mermaid-svg-QSv6WYACnViH5zdu .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-QSv6WYACnViH5zdu {color: rgba(0, 0, 0, 0.75);font: ;}

FG:8
CEFG:35
BCEFG:80
ROOT
F
G
C
E
B
CFG:21
A
D
AD:129

4、添加0和1,规则左0右1

#mermaid-svg-73FpSTu3IBssRAG9 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-73FpSTu3IBssRAG9 .label text{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .node rect,#mermaid-svg-73FpSTu3IBssRAG9 .node circle,#mermaid-svg-73FpSTu3IBssRAG9 .node ellipse,#mermaid-svg-73FpSTu3IBssRAG9 .node polygon,#mermaid-svg-73FpSTu3IBssRAG9 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-73FpSTu3IBssRAG9 .node .label{text-align:center;fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .node.clickable{cursor:pointer}#mermaid-svg-73FpSTu3IBssRAG9 .arrowheadPath{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-73FpSTu3IBssRAG9 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-73FpSTu3IBssRAG9 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-73FpSTu3IBssRAG9 .edgeLabel rect{opacity:0.9}#mermaid-svg-73FpSTu3IBssRAG9 .edgeLabel span{color:#333}#mermaid-svg-73FpSTu3IBssRAG9 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-73FpSTu3IBssRAG9 .cluster text{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-73FpSTu3IBssRAG9 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-73FpSTu3IBssRAG9 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-73FpSTu3IBssRAG9 .actor-line{stroke:grey}#mermaid-svg-73FpSTu3IBssRAG9 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-73FpSTu3IBssRAG9 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-73FpSTu3IBssRAG9 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-73FpSTu3IBssRAG9 .sequenceNumber{fill:#fff}#mermaid-svg-73FpSTu3IBssRAG9 #sequencenumber{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-73FpSTu3IBssRAG9 .messageText{fill:#333;stroke:#333}#mermaid-svg-73FpSTu3IBssRAG9 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-73FpSTu3IBssRAG9 .labelText,#mermaid-svg-73FpSTu3IBssRAG9 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-73FpSTu3IBssRAG9 .loopText,#mermaid-svg-73FpSTu3IBssRAG9 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-73FpSTu3IBssRAG9 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-73FpSTu3IBssRAG9 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-73FpSTu3IBssRAG9 .noteText,#mermaid-svg-73FpSTu3IBssRAG9 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-73FpSTu3IBssRAG9 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-73FpSTu3IBssRAG9 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-73FpSTu3IBssRAG9 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-73FpSTu3IBssRAG9 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .section{stroke:none;opacity:0.2}#mermaid-svg-73FpSTu3IBssRAG9 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-73FpSTu3IBssRAG9 .section2{fill:#fff400}#mermaid-svg-73FpSTu3IBssRAG9 .section1,#mermaid-svg-73FpSTu3IBssRAG9 .section3{fill:#fff;opacity:0.2}#mermaid-svg-73FpSTu3IBssRAG9 .sectionTitle0{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .sectionTitle1{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .sectionTitle2{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .sectionTitle3{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-73FpSTu3IBssRAG9 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .grid path{stroke-width:0}#mermaid-svg-73FpSTu3IBssRAG9 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-73FpSTu3IBssRAG9 .task{stroke-width:2}#mermaid-svg-73FpSTu3IBssRAG9 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .taskText:not([font-size]){font-size:11px}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-73FpSTu3IBssRAG9 .task.clickable{cursor:pointer}#mermaid-svg-73FpSTu3IBssRAG9 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-73FpSTu3IBssRAG9 .taskText0,#mermaid-svg-73FpSTu3IBssRAG9 .taskText1,#mermaid-svg-73FpSTu3IBssRAG9 .taskText2,#mermaid-svg-73FpSTu3IBssRAG9 .taskText3{fill:#fff}#mermaid-svg-73FpSTu3IBssRAG9 .task0,#mermaid-svg-73FpSTu3IBssRAG9 .task1,#mermaid-svg-73FpSTu3IBssRAG9 .task2,#mermaid-svg-73FpSTu3IBssRAG9 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutside0,#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutside2{fill:#000}#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutside1,#mermaid-svg-73FpSTu3IBssRAG9 .taskTextOutside3{fill:#000}#mermaid-svg-73FpSTu3IBssRAG9 .active0,#mermaid-svg-73FpSTu3IBssRAG9 .active1,#mermaid-svg-73FpSTu3IBssRAG9 .active2,#mermaid-svg-73FpSTu3IBssRAG9 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-73FpSTu3IBssRAG9 .activeText0,#mermaid-svg-73FpSTu3IBssRAG9 .activeText1,#mermaid-svg-73FpSTu3IBssRAG9 .activeText2,#mermaid-svg-73FpSTu3IBssRAG9 .activeText3{fill:#000 !important}#mermaid-svg-73FpSTu3IBssRAG9 .done0,#mermaid-svg-73FpSTu3IBssRAG9 .done1,#mermaid-svg-73FpSTu3IBssRAG9 .done2,#mermaid-svg-73FpSTu3IBssRAG9 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-73FpSTu3IBssRAG9 .doneText0,#mermaid-svg-73FpSTu3IBssRAG9 .doneText1,#mermaid-svg-73FpSTu3IBssRAG9 .doneText2,#mermaid-svg-73FpSTu3IBssRAG9 .doneText3{fill:#000 !important}#mermaid-svg-73FpSTu3IBssRAG9 .crit0,#mermaid-svg-73FpSTu3IBssRAG9 .crit1,#mermaid-svg-73FpSTu3IBssRAG9 .crit2,#mermaid-svg-73FpSTu3IBssRAG9 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-73FpSTu3IBssRAG9 .activeCrit0,#mermaid-svg-73FpSTu3IBssRAG9 .activeCrit1,#mermaid-svg-73FpSTu3IBssRAG9 .activeCrit2,#mermaid-svg-73FpSTu3IBssRAG9 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-73FpSTu3IBssRAG9 .doneCrit0,#mermaid-svg-73FpSTu3IBssRAG9 .doneCrit1,#mermaid-svg-73FpSTu3IBssRAG9 .doneCrit2,#mermaid-svg-73FpSTu3IBssRAG9 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-73FpSTu3IBssRAG9 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-73FpSTu3IBssRAG9 .milestoneText{font-style:italic}#mermaid-svg-73FpSTu3IBssRAG9 .doneCritText0,#mermaid-svg-73FpSTu3IBssRAG9 .doneCritText1,#mermaid-svg-73FpSTu3IBssRAG9 .doneCritText2,#mermaid-svg-73FpSTu3IBssRAG9 .doneCritText3{fill:#000 !important}#mermaid-svg-73FpSTu3IBssRAG9 .activeCritText0,#mermaid-svg-73FpSTu3IBssRAG9 .activeCritText1,#mermaid-svg-73FpSTu3IBssRAG9 .activeCritText2,#mermaid-svg-73FpSTu3IBssRAG9 .activeCritText3{fill:#000 !important}#mermaid-svg-73FpSTu3IBssRAG9 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-73FpSTu3IBssRAG9 g.classGroup text .title{font-weight:bolder}#mermaid-svg-73FpSTu3IBssRAG9 g.clickable{cursor:pointer}#mermaid-svg-73FpSTu3IBssRAG9 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-73FpSTu3IBssRAG9 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-73FpSTu3IBssRAG9 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-73FpSTu3IBssRAG9 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-73FpSTu3IBssRAG9 .dashed-line{stroke-dasharray:3}#mermaid-svg-73FpSTu3IBssRAG9 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 .commit-id,#mermaid-svg-73FpSTu3IBssRAG9 .commit-msg,#mermaid-svg-73FpSTu3IBssRAG9 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-73FpSTu3IBssRAG9 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-73FpSTu3IBssRAG9 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-73FpSTu3IBssRAG9 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-73FpSTu3IBssRAG9 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-73FpSTu3IBssRAG9 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-73FpSTu3IBssRAG9 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-73FpSTu3IBssRAG9 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-73FpSTu3IBssRAG9 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-73FpSTu3IBssRAG9 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-73FpSTu3IBssRAG9 .edgeLabel text{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-73FpSTu3IBssRAG9 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-73FpSTu3IBssRAG9 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-73FpSTu3IBssRAG9 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-73FpSTu3IBssRAG9 .note-edge{stroke-dasharray:5}#mermaid-svg-73FpSTu3IBssRAG9 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-73FpSTu3IBssRAG9 .error-icon{fill:#522}#mermaid-svg-73FpSTu3IBssRAG9 .error-text{fill:#522;stroke:#522}#mermaid-svg-73FpSTu3IBssRAG9 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-73FpSTu3IBssRAG9 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-73FpSTu3IBssRAG9 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-73FpSTu3IBssRAG9 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-73FpSTu3IBssRAG9 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-73FpSTu3IBssRAG9 .marker{fill:#333}#mermaid-svg-73FpSTu3IBssRAG9 .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;} #mermaid-svg-73FpSTu3IBssRAG9 {color: rgba(0, 0, 0, 0.75);font: ;}

0
1
0
1
0
1
0
1
0
1
0
1
FG:8
CEFG:35
BCEFG:80
F
G
C
E
B
A
D
CFG:21
AD:129
ROOT

每个字符的二进制编码为从根节点数到对应的叶子节点,路径上的值拼接起来就是叶子节点字母的应该的编码

字符 编码
A 10
B 01
C 0011
D 11
E 000
F 00101
G 00100

那么当我想传送 ABC时,编码为 10 01 0011
出现频率越多的字母,他的编码越短 ,出现频率越少的字母,他的编码越长

哈夫曼树原理及其构造方法相关推荐

  1. 哈夫曼树原理及构造方法

    原文链接:https://blog.csdn.net/qq_29519041/article/details/81428934 哈夫曼树的建立 (1)初始化:根据给定的n个权值,构造n棵二叉树的森林集 ...

  2. 哈夫曼树原理及Java编码实现

    文章目录 前言 一.哈夫曼树原理 二.哈夫曼编码(Java题解) 参考资料 前言 所有博客文件目录索引:博客目录索引(持续更新) 源代码:Gitee-Huffman.java.Github-Huffm ...

  3. 哈夫曼树原理,及构造方法

    哈夫曼树(最优二叉树) 百度百科:https://baike.baidu.com/item/%E5%93%88%E5%A4%AB%E6%9B%BC%E6%A0%91/2305769?fr=aladdi ...

  4. 哈夫曼树原理、画法和具体例子

    好久没画过哈夫曼树了,一做题发现全忘了..特别记录一下,以一道题的详细解答过程为例. 1.哈夫曼压缩原理 当各种指令出现的频度不均等时,对出现频度最高的指令用最短的位数表示,出现频度较低的则用较长的位 ...

  5. Python---哈夫曼树---Huffman Tree

    今天要讲的是天才哈夫曼的哈夫曼编码,这是树形数据结构的一个典型应用. !!!敲黑板!!!哈夫曼树的构建以及编码方式将是我们的学习重点. 老方式,代码+解释,手把手教你Python完成哈夫曼编码的全过程 ...

  6. 数据结构---哈夫曼树

    数据结构-哈夫曼树 原理:参考趣学数据结构 代码: #include<stdio.h> #include<stdlib.h> #define N 100 #define INF ...

  7. 5.5.3哈夫曼树和哈夫曼编码

    太棒了小哥哥讲的 (ʃƪ ˘ ³˘)哈哈哈棒棒哒 大家好,本节后我们一起来学习,二产数应用的最后一个考点就是哈弗曼数,毕竟在哈佛迈出之前,我们先来了解一个知识点,就是什么是带全路径长度,我们之前学习过 ...

  8. 超好理解的哈夫曼树(最优二叉树)与例题

    对于比较官方的说法就是给定n个权值作为n个叶子结点,构造一棵二叉树,若带权路径长度达到最小,称这样的二叉树为最优二叉树,也称为哈夫曼树(Huffman Tree).哈夫曼树是带权路径长度最短的树,权值 ...

  9. 最优二叉树(哈夫曼树)Java实现

    此篇博客讲最优二叉树也叫哈夫曼树的原理,以及构建步骤,还有哈夫曼编码原理.建议有二叉树基础朋友学习交流.对二叉树基础可以看我的另外一篇博客二叉树的构建以及遍历 文章目录 哈夫曼树引出: 哈夫曼树原理及 ...

最新文章

  1. selenium元素的定位以及操作 第二章
  2. 【Python基础】07、Python类与面向对象
  3. 【转】ABP源码分析十二:本地化
  4. linux putty 字体,putty修改字体配色
  5. SQLSERVER:sqlserver2008r2安装好后,自动提示功能不可以使用
  6. 如何理解皮尔逊相关系数(Pearson Correlation Coefficient)?
  7. Uiautomator入门(初学者用)
  8. DDOS防御流量清洗的解决方案,流量清洗服务有什么功能?
  9. sqlplus使用update操作完数据,不要忘记commit,不然并没有写入到数据库中去
  10. 腾讯、华为角逐“云游戏”
  11. 1153:绝对素数(一本通)
  12. 反射一、反射的基本概念
  13. 【小白从小学Python、C、Java】【计算机等级考试二级-必会题】【ASCII码与字符相互转化】
  14. python把英语句子成分字母_(完整版)英语句子成分分析大全
  15. VC的IP控件的用法
  16. 学校校园教务老师选课排课系统 毕业设计毕设源码毕业论文参考(1)功能概要
  17. python程序设计实验指导书_《Python程序设计》实验指导书.pdf
  18. 基于Python高光谱遥感影像处理实例
  19. 用php数组做一个表格,一个非常好用的PHP数组函数
  20. kubevirt(四)热插拔卷(hotplug volume)

热门文章

  1. 鼠标左键双击变成打开“属性”,其他按键失灵
  2. macbook按u键入笔画
  3. 对抗样本(二)L-BFGS
  4. flutter 布局 Stack Positioned的混合操作 两个组件Container重叠 构建背景圆角操作 类似css的relative
  5. 地球暖化有新解决方案? 冰岛科学家研发出二氧化碳石头
  6. Python3 实现大众点评网酒店信息和酒店评论的网页爬取
  7. SpringBoot 2.x 优雅解决分布式限流
  8. java杂谈之浅谈行为参数化
  9. 【数据结构】哈希表的原理及实现
  10. 强烈推荐的几个数据清洗小工具箱