Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> การเขียนโปรแกรม

Unrooted Binary Tree ในโครงสร้างข้อมูล


นิยาม

Unrooted Binary Tree เป็น Undirected Graph ที่เชื่อมต่อและไม่มี Cycle โหนดที่มีเพื่อนบ้าน 1 ตัวคือ Leaf โหนดที่เหลือคือ Internal Nodes Degree = จำนวนเพื่อนบ้าน ในต้นไม้ที่มีโหนดมากกว่า 1 ใบไม้คือโหนดที่ Degree = 1

Free Tree

Free Tree เป็น Binary Tree ที่ Internal Nodes ทุกตัวมี Degree = 3 อย่างแม่นยำ ใน CS Binary Trees มักเป็น Rooted และ Ordered แต่ Unrooted Binary Trees มีความสำคัญใน Hierarchical Clustering และ Evolutionary Tree Reconstruction

ตัวอย่าง

Unrooted Binary Tree ในโครงสร้างข้อมูล