TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

DAA | Comparison Network

DAA | Comparison Network with daa tutorial, introduction, Algorithm, Asymptotic Analysis, Control Structure, Recurrence, Master Method, Recursion Tree Method, Sorting Algorithm, Bubble Sort, Selection Sort, Insertion Sort, Binary Search, Merge Sort, Counting Sort, etc.

<< Back to DAA

Comparison Networks

A comparison network is made of wires and comparators. A comparator is a device with two inputs, x and y, and two outputs, x' and y,' where

x'= min (x, y)
y' = max (x, y)

In Comparison Networks input appear on the left and outputs on the right, with the smallest input value appearing on the top output and the largest input value appearing on the bottom output. Each comparator operates in O (1) time. In other words, we consider that the time between the appearance of the input values x and y and the production of the output values x' and y' is a constant.

A wire transmits a value from place to place. A comparison network contains n input wires a1,a2,........an through which the benefits to be sorted enter the network, and n output wires b1,b2,......bn which produce the results computed by the network.

Comparison Networks

Comparison Network is a set of comparators interconnected by wires. Running time of comparator can define regarding depth.

Depth of a Wire: An input wire of a comparison network has depth 0. Now, if a comparator has two input wires with depths dx and dy' then its output wires have depth max (dx,dy) + 1.

A sorting network is a comparison network for which the output sequence is monotonically increasing (that is b1≤ b2 ≤ ....bn) for every input sequence.

Fig: A Sorting network based on Insertion Sort

Comparison Networks



Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf