<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.categories.acsl.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mariana</id>
	<title>ACSL Category Descriptions - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.categories.acsl.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mariana"/>
	<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Special:Contributions/Mariana"/>
	<updated>2026-04-17T15:14:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=818</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=818"/>
		<updated>2020-09-01T17:25:07Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=817</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=817"/>
		<updated>2020-09-01T17:24:11Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=816</id>
		<title>Advanced Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=816"/>
		<updated>2020-09-01T17:22:46Z</updated>

		<summary type="html">&lt;p&gt;Mariana: /* Problem 6 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 2==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])&amp;#039;&amp;#039;&amp;#039; represents the group number 1 that captures the firs letter;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is the number of the group that appears at the end of the string;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a,e,i,o,u]{1,3}&amp;#039;&amp;#039;&amp;#039; describes sequence of one to three vowels;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\.*&amp;#039;&amp;#039;&amp;#039;  the character ‘.’ appears zero to more  times;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[b-df-hj-np-tv-z]+&amp;#039;&amp;#039;&amp;#039; a sequence of consonants, at least one consonant.&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=815</id>
		<title>Advanced Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=815"/>
		<updated>2020-09-01T17:22:22Z</updated>

		<summary type="html">&lt;p&gt;Mariana: /* Problem 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])&amp;#039;&amp;#039;&amp;#039; represents the group number 1 that captures the firs letter;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is the number of the group that appears at the end of the string;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a,e,i,o,u]{1,3}&amp;#039;&amp;#039;&amp;#039; describes sequence of one to three vowels;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\.*&amp;#039;&amp;#039;&amp;#039;  the character ‘.’ appears zero to more  times;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[b-df-hj-np-tv-z]+&amp;#039;&amp;#039;&amp;#039; a sequence of consonants, at least one consonant.&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=814</id>
		<title>Advanced Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=814"/>
		<updated>2020-09-01T17:22:03Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])&amp;#039;&amp;#039;&amp;#039; represents the group number 1 that captures the firs letter;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is the number of the group that appears at the end of the string;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a,e,i,o,u]{1,3}&amp;#039;&amp;#039;&amp;#039; describes sequence of one to three vowels;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\.*&amp;#039;&amp;#039;&amp;#039;  the character ‘.’ appears zero to more  times;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[b-df-hj-np-tv-z]+&amp;#039;&amp;#039;&amp;#039; a sequence of consonants, at least one consonant.&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=813</id>
		<title>Advanced Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=813"/>
		<updated>2020-09-01T17:20:22Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=812</id>
		<title>Advanced Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Advanced_Regular_Expressions&amp;diff=812"/>
		<updated>2020-09-01T17:19:49Z</updated>

		<summary type="html">&lt;p&gt;Mariana: Created page with &amp;quot;== More useful patterns == {| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;| |- ! Pattern !! Description !!      REGEX   !! Sample match !! Sample not match      |- | \d || &amp;#039;&amp;#039;&amp;#039;Di...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Main_Page&amp;diff=811</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Main_Page&amp;diff=811"/>
		<updated>2020-09-01T17:18:00Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Welcome to the wiki describing the topics covered in the short programs section of the [//www.acsl.org ACSL] contests.&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;d like to contribute to this wiki - and we&amp;#039;d love to improve it - please shoot us an email requesting an account. Conversely, if we&amp;#039;ve linked to your material (especially YouTube videos) that you&amp;#039;d prefer that we do not reference, let us know and we will promptly remove those links.&lt;br /&gt;
&lt;br /&gt;
Categories covered:&lt;br /&gt;
&lt;br /&gt;
* [[Assembly Language Programming]]  &lt;br /&gt;
* [[Bit-String Flicking]] &lt;br /&gt;
* [[Boolean Algebra]]&lt;br /&gt;
* [[Computer Number Systems]]&lt;br /&gt;
* [[Data Structures]]&lt;br /&gt;
* [[Digital Electronics]] &lt;br /&gt;
* [[Karnaugh Map]] &lt;br /&gt;
* [[FSAs and Regular Expressions]] &lt;br /&gt;
* [[Advanced Regular Expressions]] &lt;br /&gt;
* [[Graph Theory]]&lt;br /&gt;
* [[LISP]] &lt;br /&gt;
* [[Prefix/Infix/Postfix Notation]]&lt;br /&gt;
* [[Recursive Functions]]&lt;br /&gt;
* [[What Does This Program Do?]]&lt;br /&gt;
* [//www.acsl.org/categories/C1Elem-ComputerNumberSystems.pdf Elementary Division: Computer Number Systems (Contest 1)]&lt;br /&gt;
* [//www.acsl.org/categories/C2Elem-Prefix-Postfix-InfixNotation.pdf Elementary Division: Prefix-Postfix-Infix Notation (Contest 2)]]&lt;br /&gt;
* [//www.acsl.org/categories/C3Elem-BooleanAlgebra.pdf Elementary Division: Boolean Algebra (Contest 3)]&lt;br /&gt;
* [//www.acsl.org/categories/C4Elem-GraphTheory.pdf Elementary Division: Graph Theory (Contest 4)]&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [//meta.wikimedia.org/wiki/Help:Contents User&amp;#039;s Guide] for information on using the wiki software&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki FAQ]&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:TEX5.jpg&amp;diff=770</id>
		<title>File:TEX5.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:TEX5.jpg&amp;diff=770"/>
		<updated>2020-08-31T08:40:04Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:TEX4.jpg&amp;diff=769</id>
		<title>File:TEX4.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:TEX4.jpg&amp;diff=769"/>
		<updated>2020-08-31T08:39:19Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=768</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=768"/>
		<updated>2020-08-31T08:38:50Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean three variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:TEX4.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 5 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean four variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = A \overline{B} \overline{D} + A B \overline{C} \overline{D} + A B C + B \overline{C} D + \overline{A} B C D $  || [[File:TEX5.jpg|286px]] || $ f = B D + A \overline{D} $ &lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=767</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=767"/>
		<updated>2020-08-31T08:37:18Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean three variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4EX.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 5 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean four variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = A \overline{B} \overline{D} + A B \overline{C} \overline{D} + A B C + B \overline{C} D + \overline{A} B C D $  || [[File:T5EX.jpg|286px]] || $ f = B D + A \overline{D} $ &lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=766</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=766"/>
		<updated>2020-08-31T08:07:06Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean three variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4IN1N.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 5 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean four variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = A \overline{B} \overline{D} + A B \overline{C} \overline{D} + A B C + B \overline{C} D + \overline{A} B C D $  || [[File:T4IN1N.jpg|286px]] || $ f = B D + A \overline{D} $ &lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=765</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=765"/>
		<updated>2020-08-31T08:05:56Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean three variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4IN1N.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  ||&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 5 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean four variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = A \overline{B} \overline{D} + A B \overline{C} \overline{D} + A B C + B \overline{C} D + \overline{A} B C D $  || [[File:T4IN1N.jpg|286px]] || $ f = B D + A \overline{D} $  ||&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=764</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=764"/>
		<updated>2020-08-31T08:00:42Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean three variable equation using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4IN1N.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  ||&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=763</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=763"/>
		<updated>2020-08-31T07:56:35Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean equations using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial function !! Karnaugh Map !! Minimal function&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4IN1N.jpg|286px]] || $ f = \overline{C} + A \overline{B} $  ||&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=762</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=762"/>
		<updated>2020-08-31T07:53:55Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 4 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Simplify the following Boolean equations using Karnaugh map. &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| $ f = \overline{A} \overline{B} \overline{C}  + A B \overline{C}  +A \overline{B} + \overline{A} \overline{C} $  || [[File:T4IN1N.jpg|286px]] ||&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=761</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=761"/>
		<updated>2020-08-31T07:47:46Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term $ A \overline{B} C $ is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=760</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=760"/>
		<updated>2020-08-31T07:43:34Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A}  \overline{B}$ is obviously dependent only on $ \overline{B} $. But it is not so obvious that the following three input expression $ A \overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A \overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=759</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=759"/>
		<updated>2020-08-31T07:42:43Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A} \ overline{B}$ is obviously dependent only on $ \overline{B}$. But it is not so obvious that the following three input expression $ A\overline{B} + \overline{B} C + \overline{A} C $ is represented by $ A\overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=758</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=758"/>
		<updated>2020-08-31T07:41:26Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $ A \overline{B}  + \overline{A} \overline{B}$ is obviously dependent only on $ \overline{B}$. But it is not so obvious that the following three input expression $ A\overline{B}+\overline{B} C+ \overline{A} C $ is represented by $ A\overline{B} + \overline{A} C $ . &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=757</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=757"/>
		<updated>2020-08-31T07:36:56Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as $x A \overline{B}  + \overline{A} \overline{A}$ is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;. But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=756</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=756"/>
		<updated>2020-08-31T07:32:20Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;. But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*The &amp;#039;&amp;#039;xnor&amp;#039;&amp;#039; of two values is true whenever the values are the same. It is the &amp;#039;&amp;#039;not&amp;#039;&amp;#039; of the &amp;#039;&amp;#039;xor&amp;#039;&amp;#039; function. It uses the $\odot$ operator: $x \odot y = \overline{x \oplus y}$. The &amp;#039;&amp;#039;xnor&amp;#039;&amp;#039; can be built from basic operators: $x \odot y = x  y + \overline{x}  \overline{y}$ The values of  &amp;#039;&amp;#039;xnor&amp;#039;&amp;#039; for all possible inputs is shown in the following truth table:&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=755</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=755"/>
		<updated>2020-08-31T07:24:31Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;. But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=754</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=754"/>
		<updated>2020-08-31T07:17:44Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells, depending on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=753</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=753"/>
		<updated>2020-08-31T07:14:41Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following table illustrates some examples of minimizing with two, three, four and five-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This table illustrates the grouping of one, two, four, eight and sixteen cells depends on the number of inputs. For example, in a four-variable map, the grouping of two cells eliminates one variable, the grouping of four cells eliminates two variables, and the grouping of eight cells eliminates three variables. The rule is the same for different number of input variables. &amp;lt;br/&amp;gt;&lt;br /&gt;
Any given grouping of 1’s in the Karnaugh map is identified by a product form. &amp;lt;br/&amp;gt;&lt;br /&gt;
Minimization involves the gathering of the various groups in the most efficient manner. The mapping of a sum of product terms is accomplished by inserting a 1 in each cell of a map containing a particular product term. &amp;lt;br/&amp;gt;&lt;br /&gt;
The advantage of the map is that it gives a clear and complete picture of the function. It can immediately be determined if the reduction is unique or if there exist other minimal expressions.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=752</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=752"/>
		<updated>2020-08-31T07:11:06Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
&lt;br /&gt;
The Karnaugh map is an orderly arrangement of squares with assignments such that the difference between any two adjacent squares is a one-variable change. The map must contain a square or cell for each unique combination of input variables. A map for two variables A and B must have four cells, because there are 2&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt; different combinations of two input variables. A map for three variables A, B and C must contain 2&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt; or eight cells, and a map on n variables must contain 2&amp;lt;sup&amp;gt;n&amp;lt;/sup&amp;gt; cells. An assignment of 1 for uncomplemented variable and 0 for a complemented variable is made. For instance, a term AB*C is equivalent to the binary notations 101. The table bellow shows the ways to define each cell of two, three and four variables functions. &amp;lt;br/&amp;gt;&lt;br /&gt;
The alphabetical input variables are identified at the upper left-hand corner of the box. For example, for three input variable function, the diagonal lines indicates that the variables A and B are represented by the binary notations across the top of the matrix (which is a Gray Code with the unique property of only a single bit change when going from one state to the next) and are contained in the vertical column below each assignment. The variable C is designed down the side of the matrix and is represented by horizontal rows within the matrix. Each cell represents a unique combination of the variables. &lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=751</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=751"/>
		<updated>2020-08-31T07:09:19Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the &amp;#039;&amp;#039;&amp;#039;Karnaugh Maps&amp;#039;&amp;#039;&amp;#039; (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=750</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=750"/>
		<updated>2020-08-31T07:08:26Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=749</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=749"/>
		<updated>2020-08-31T07:07:55Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; (&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; - complemented variable)  is obviously dependent only on B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;.But it is not so obvious that the following three input expression AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;C is represented by AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;/sup&amp;gt;*&amp;lt;sup&amp;gt;C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=748</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=748"/>
		<updated>2020-08-31T07:04:34Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;B&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt; is obviously dependent only on B*.But it is not so obvious that the following three input expression AB*+B*C+A*C is represented by AB*+A*C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=747</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=747"/>
		<updated>2020-08-31T07:03:23Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB&amp;lt;sup&amp;gt;*&amp;lt;/sup&amp;gt;+A*B* is obviously dependent only on B*.But it is not so obvious that the following three input expression AB*+B*C+A*C is represented by AB*+A*C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=746</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=746"/>
		<updated>2020-08-31T07:02:07Z</updated>

		<summary type="html">&lt;p&gt;Mariana: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB*+A*B* is obviously dependent only on B*.But it is not so obvious that the following three input expression AB*+B*C+A*C is represented by AB*+A*C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=745</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=745"/>
		<updated>2020-08-31T07:01:20Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases.&lt;br /&gt;
&lt;br /&gt;
For example the two input variable expression as AB*+A*B* is obviously dependent only on B*.But it is not so obvious that the following three input expression AB*+B*C+A*C is represented by AB*+A*C. &amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Among these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=743</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=743"/>
		<updated>2020-08-25T17:18:38Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])&amp;#039;&amp;#039;&amp;#039; represents the group number 1 that captures the firs letter;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is the number of the group that appears at the end of the string;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a,e,i,o,u]{1,3}&amp;#039;&amp;#039;&amp;#039; describes sequence of one to three vowels;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\.*&amp;#039;&amp;#039;&amp;#039;  the character ‘.’ appears zero to more  times;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[b-df-hj-np-tv-z]+&amp;#039;&amp;#039;&amp;#039; a sequence of consonants, at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=742</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=742"/>
		<updated>2020-08-25T17:17:36Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;([a-z])&amp;#039;&amp;#039;&amp;#039; represents the group number 1 that captures the firs letter;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is the number of the group that appears at the end of the string;&lt;br /&gt;
&lt;br /&gt;
[a,e,i,o,u]{1,3} describes sequence of one to three vowels;&lt;br /&gt;
&lt;br /&gt;
\.*  the character ‘.’ appears zero to more  times;&lt;br /&gt;
&lt;br /&gt;
[b-df-hj-np-tv-z]+ a sequence of consonants, at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=741</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=741"/>
		<updated>2020-08-25T17:15:42Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&lt;br /&gt;
([a-z]) represents the group number 1 that captures the firs letter;&lt;br /&gt;
 \1 is the number of the group that appears at the end of the string;&lt;br /&gt;
[a,e,i,o,u]{1,3} describes sequence of one to three vowels;&lt;br /&gt;
\.*  the character ‘.’ appears zero to more  times;&lt;br /&gt;
[b-df-hj-np-tv-z]+ a sequence of consonants, at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=740</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=740"/>
		<updated>2020-08-25T17:13:52Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
Write a regular expression describing a set of strings formed to the following rules:&lt;br /&gt;
1. Contain only lowercase letters of the English alphabet and the character &amp;#039;.&amp;#039;;&lt;br /&gt;
2. Start and end with the same letter;&lt;br /&gt;
3. Contain a sequence of at least one and at most 3 vowels, separated by zero or more characters &amp;#039;.&amp;#039;   of a sequence consisting of at least one consonant.&lt;br /&gt;
Solution:&lt;br /&gt;
The Regular Expression is:&lt;br /&gt;
([a-z])[a,e,i,o,u]{1,3}\.*[b-df-hj-np-tv-z]+(\1)&lt;br /&gt;
([a-z]) represents the group number 1 that captures the firs letter;&lt;br /&gt;
 \1 is the number of the group that appears at the end of the string;&lt;br /&gt;
[a,e,i,o,u]{1,3} describes sequence of one to three vowels;&lt;br /&gt;
\.*  the character ‘.’ appears zero to more  times;&lt;br /&gt;
[b-df-hj-np-tv-z]+ a sequence of consonants, at least one consonant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=739</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=739"/>
		<updated>2020-08-25T17:12:31Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
== Problem 6 ==&lt;br /&gt;
&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=738</id>
		<title>FSAs and Regular Expressions</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=FSAs_and_Regular_Expressions&amp;diff=738"/>
		<updated>2020-08-25T17:09:38Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A Finite State Automaton (FSA) is a mathematical model of computation comprising all 4 of the following: 1) a finite number of &amp;#039;&amp;#039;states&amp;#039;&amp;#039;, of which exactly one is &amp;#039;&amp;#039;active&amp;#039;&amp;#039; at any given time; 2) &amp;#039;&amp;#039;transition rules&amp;#039;&amp;#039; to change the active state; 3) an &amp;#039;&amp;#039;initial state&amp;#039;&amp;#039;; and 4) one or more &amp;#039;&amp;#039;final states&amp;#039;&amp;#039;. We can draw an FSA by representing each state as a circle, the final state as a double circle, the start state as the only state with an incoming arrow, and the transition rules as labeled-edges connecting the states. When labels are assigned to states, they appear inside the circle representing the state.  &lt;br /&gt;
&lt;br /&gt;
In this category, FSAs will be limited to parsing strings. That is, determining if a string is valid or not. &lt;br /&gt;
&lt;br /&gt;
= Basics =&lt;br /&gt;
&lt;br /&gt;
Here is a drawing of an FSA that is used to parse strings consisting of x&amp;#039;s and y&amp;#039;s:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;&lt;br /&gt;
[[File:fsa.svg|250px]]&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above FSA, there are three states: A, B, and C. The initial state is A; the final state is C. The only way to go from state A to B is by &amp;#039;&amp;#039;seeing&amp;#039;&amp;#039; the letter x. Once in state B, there are two transition rules:  seeing the letter y will cause the FSA to make C the active state, and seeing an x will keep B as the active state. State C is a final state so if the string being parsed is completed and the FSA is in State C, the input string is said to be &amp;#039;&amp;#039;accepted&amp;#039;&amp;#039; by the FSA. In State C, seeing any additional letter y will keep the machine in state C. The FSA above will accept strings composed of one or more x’s followed by one or more y’s (e.g., xy, xxy, xxxyy, xyyy, xxyyyy).  &lt;br /&gt;
 &lt;br /&gt;
A Regular Expression (RE) is an algebraic representation of an FSA. For example, the regular expression corresponding to the first FSA given above is xx*yy*. &lt;br /&gt;
&lt;br /&gt;
The rules for forming a Regular Expression (RE) are as follows:&lt;br /&gt;
:1. The null string (λ) is a RE.&lt;br /&gt;
:2. If the string a is in the input alphabet, then it is a RE.&lt;br /&gt;
:3. if a and b are both REs, then so are the strings built up using the following rules:&lt;br /&gt;
::a. CONCATENATION.  &amp;quot;ab&amp;quot; (a followed by b).&lt;br /&gt;
::b. UNION. &amp;quot;aUb&amp;quot; or &amp;quot;a|b&amp;quot; (a or b).  &lt;br /&gt;
::c. CLOSURE. &amp;quot;a*&amp;quot; (a repeated zero or more times). This is known as the Kleene Star.&lt;br /&gt;
&lt;br /&gt;
The order of precedence for Regular Expression operators is: Kleene Star, concatenation, and then union. &lt;br /&gt;
Similar to standard Algebra, parentheses can be used to group sub-expressions. &lt;br /&gt;
For example, &amp;quot;dca*b&amp;quot; generates strings dcb, dcab, dcaab, and so on, whereas&lt;br /&gt;
&amp;quot;d(ca)*b&amp;quot; generates strings db, dcab, dcacab, dcacacab, and so on.&lt;br /&gt;
&lt;br /&gt;
If we have a Regular Expression, then we can mechanically build an FSA to accept the strings which are generated by the Regular Expression.  Conversely, if we have an FSA, we can mechanically develop a Regular Expression which will describe the strings which can be parsed by the FSA.  For a given FSA or Regular Expression, there are many others which are equivalent to it. A &amp;quot;most simplified&amp;quot; Regular Expression or FSA is not always well defined.&lt;br /&gt;
&lt;br /&gt;
= Regular Expression Identities =&lt;br /&gt;
&lt;br /&gt;
{| Class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1.  (a*)*  = a*&lt;br /&gt;
|-&lt;br /&gt;
|2.  aa*    = a*a&lt;br /&gt;
|-&lt;br /&gt;
|3.  aa* U λ  = a*&lt;br /&gt;
|-&lt;br /&gt;
|4.  a(b U c) = ab U ac&lt;br /&gt;
|-&lt;br /&gt;
|5.  a(ba)* = (ab)*a&lt;br /&gt;
|-&lt;br /&gt;
|6.  (a U b)* = (a* U b*)*&lt;br /&gt;
|-&lt;br /&gt;
|7.  (a U b)* = (a*b*)*&lt;br /&gt;
|-&lt;br /&gt;
|8.  (a U b)* = a*(ba*)*&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= RegEx in Practice =&lt;br /&gt;
&lt;br /&gt;
Programmers use Regular Expressions (usually referred to as &amp;#039;&amp;#039;&amp;#039;regex&amp;#039;&amp;#039;&amp;#039;) extensively for&lt;br /&gt;
expressing patterns to search for. All modern programming languages have regular expression libraries.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, the specific syntax rules vary depending on the specific &lt;br /&gt;
implementation, programming language, or library in use. &lt;br /&gt;
Interactive websites for testing regexes are a useful resource for &lt;br /&gt;
learning regexes by experimentation. &lt;br /&gt;
An excellent online tool is [https://regex101.com/ https://regex101.com/].  &lt;br /&gt;
A very nice exposition is [https://automatetheboringstuff.com/2e/chapter7/ Pattern Matching with Regular Expressions] &lt;br /&gt;
from the [https://automatetheboringstuff.com/  Automate the Boring Stuff] book and online course.&lt;br /&gt;
&lt;br /&gt;
Here are the additional syntax rules that we will use. They are pretty universal across all&lt;br /&gt;
regex packages. &lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
!Pattern&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
! &amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|As described above, a vertical bar separates alternatives. For example, gray&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;grey can match &amp;quot;gray&amp;quot; or &amp;quot;grey&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
!*&lt;br /&gt;
|As described above, the asterisk indicates zero or more occurrences of the preceding element. For example, ab*c matches &amp;quot;ac&amp;quot;, &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on.&lt;br /&gt;
|-&lt;br /&gt;
!?&lt;br /&gt;
| The question mark indicates zero or one occurrences of the preceding element. For example, colou?r matches both &amp;quot;color&amp;quot; and &amp;quot;colour&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! +&lt;br /&gt;
| The plus sign indicates one or more occurrences of the preceding element. For example, ab+c matches &amp;quot;abc&amp;quot;, &amp;quot;abbc&amp;quot;, &amp;quot;abbbc&amp;quot;, and so on, but not &amp;quot;ac&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! .&lt;br /&gt;
| The wildcard . matches any character. For example, a.b matches any string that contains an &amp;quot;a&amp;quot;, then any other character, and then a &amp;quot;b&amp;quot; such as &amp;quot;a7b&amp;quot;, &amp;quot;a&amp;amp;b&amp;quot;, or &amp;quot;arb&amp;quot;, but not &amp;quot;abbb&amp;quot;. Therefore, a.*b matches any string that contains an &amp;quot;a&amp;quot; and a &amp;quot;b&amp;quot; with 0 or more characters in between.  This includes &amp;quot;ab&amp;quot;, &amp;quot;acb&amp;quot;, or &amp;quot;a123456789b&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
! [ ]&lt;br /&gt;
| A bracket expression matches a single character that is contained within the brackets. For example, [abc] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [a-z] specifies a range which matches any lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. These forms can be mixed: [abcx-z] matches &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, &amp;quot;c&amp;quot;, &amp;quot;x&amp;quot;, &amp;quot;y&amp;quot;, or &amp;quot;z&amp;quot;, as does [a-cx-z].&lt;br /&gt;
|-&lt;br /&gt;
! [^ ]&lt;br /&gt;
|Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than &amp;quot;a&amp;quot;, &amp;quot;b&amp;quot;, or &amp;quot;c&amp;quot;. [^a-z] matches any single character that is not a lowercase letter from &amp;quot;a&amp;quot; to &amp;quot;z&amp;quot;. Likewise, literal characters and ranges can be mixed.&lt;br /&gt;
|-&lt;br /&gt;
!( )&lt;br /&gt;
| &lt;br /&gt;
As described above, parentheses define a sub-expression. For example, the pattern H(ä|ae?)ndel  matches &amp;quot;Handel&amp;quot;, &amp;quot;Händel&amp;quot;, and &amp;quot;Haendel&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== More useful patterns ==&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;text-align: left&amp;quot;|&lt;br /&gt;
|-&lt;br /&gt;
! Pattern !! Description !!      REGEX   !! Sample match !! Sample&lt;br /&gt;
not match     &lt;br /&gt;
|-&lt;br /&gt;
| \d || &amp;#039;&amp;#039;&amp;#039;Digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any digit. Equivalent with [0-9].&lt;br /&gt;
 || \d\d\d || 123 || 1-3&lt;br /&gt;
|-&lt;br /&gt;
| \D || &amp;#039;&amp;#039;&amp;#039;Non digit.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a digit.&lt;br /&gt;
 || \d\D\d || 1-3 || 123&lt;br /&gt;
|-&lt;br /&gt;
| \w || &amp;#039;&amp;#039;&amp;#039;Word.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
Matches any alphanumeric character and underscore. Equivalent with [a-zA-Z0-9_].&lt;br /&gt;
|| \w\w\w || a_A || a-A&lt;br /&gt;
|-&lt;br /&gt;
| \W || &amp;#039;&amp;#039;&amp;#039;Not Word.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not word character (alphanumeric character and underscore).&lt;br /&gt;
 || \W\W\W || +-$ || +_@&lt;br /&gt;
|-&lt;br /&gt;
| \s || &amp;#039;&amp;#039;&amp;#039;Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any whitespace character (space, tab, line breaks).&lt;br /&gt;
 || \d\s\w || 1 a || 1ab&lt;br /&gt;
|-&lt;br /&gt;
| \S || &amp;#039;&amp;#039;&amp;#039;Not Whitespace.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches any character that is not a whitespace character (space, tab, line breaks). &lt;br /&gt;
|| \w\w\w\w\S\d || Test#1 || test 1&lt;br /&gt;
|-&lt;br /&gt;
| \b || &amp;#039;&amp;#039;&amp;#039;Word boundaries.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Can be used to match a complete word. Word boundaries are the boundaries between a word&lt;br /&gt;
&lt;br /&gt;
and a non-word character.&lt;br /&gt;
 || \bis\b || is; || This &lt;br /&gt;
island:&lt;br /&gt;
|-&lt;br /&gt;
|{} || &amp;#039;&amp;#039;&amp;#039;The curly braces {…}.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
It tells the computer to repeat the preceding character (or set of characters) for&lt;br /&gt;
&lt;br /&gt;
as many times as the value inside this bracket.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,}&amp;#039;&amp;#039;&amp;#039; means the preceding character is matches &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; times or &amp;#039;&amp;#039;&amp;#039;more&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;{min,max}&amp;#039;&amp;#039;&amp;#039; means that the preceding character is repeated at least &amp;#039;&amp;#039;&amp;#039;min&amp;#039;&amp;#039;&amp;#039; and&lt;br /&gt;
at most &amp;#039;&amp;#039;&amp;#039;max&amp;#039;&amp;#039;&amp;#039; times.&lt;br /&gt;
 ||&lt;br /&gt;
abc{2}&lt;br /&gt;
 || &lt;br /&gt;
abcc&lt;br /&gt;
 || &lt;br /&gt;
abc&lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .*&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between zero and unlimited times.&lt;br /&gt;
&lt;br /&gt;
 || .*&lt;br /&gt;
 ||&lt;br /&gt;
abbb&lt;br /&gt;
&lt;br /&gt;
Empty string&lt;br /&gt;
&lt;br /&gt;
 ||  &lt;br /&gt;
|-&lt;br /&gt;
|&amp;#039;&amp;#039;&amp;#039; .+&amp;#039;&amp;#039;&amp;#039; || Matches any character (except for line terminators), matches between one and unlimited times.&lt;br /&gt;
 || .+&lt;br /&gt;
 || a&lt;br /&gt;
abbcc&lt;br /&gt;
&lt;br /&gt;
 || Empty string&lt;br /&gt;
|-&lt;br /&gt;
| ^ || &amp;#039;&amp;#039;&amp;#039;Anchor ^.The start of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just before the first character of the string.&lt;br /&gt;
 ||^The\s\w+ || The contest || One contest&lt;br /&gt;
|-&lt;br /&gt;
| $ || &amp;#039;&amp;#039;&amp;#039;Anchor $. The end of the line.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Matches position just after the last character of the string.&lt;br /&gt;
||\d{4}\sACSL$&lt;br /&gt;
 ||2020 ACSL&lt;br /&gt;
 ||2020 STAR&lt;br /&gt;
|-&lt;br /&gt;
| \||&amp;#039;&amp;#039;&amp;#039;Escape a special character.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
If you want to use any of the metacharacters as a literal in a regex, you need to escape them with a backslash,&lt;br /&gt;
like: \. \* \+ \[ etc.&lt;br /&gt;
 ||\w\w\w&amp;#039;&amp;#039;&amp;#039;\.&amp;#039;&amp;#039;&amp;#039; ||cat&amp;#039;&amp;#039;&amp;#039;.&amp;#039;&amp;#039;&amp;#039; ||lion&lt;br /&gt;
|-&lt;br /&gt;
| ()|| &amp;#039;&amp;#039;&amp;#039;Groups.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Regular expressions allow us to not just match text but also to &amp;#039;&amp;#039;&amp;#039;extract information&lt;br /&gt;
for further processing.&lt;br /&gt;
This is done by defining &amp;#039;&amp;#039;&amp;#039;groups of characthers&amp;#039;&amp;#039;&amp;#039; and capturing them using &lt;br /&gt;
the parentheses &amp;#039;&amp;#039;&amp;#039;()&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
 || ^(file.+)\.docx$ || file_graphs.docx&lt;br /&gt;
file_lisp.docx &lt;br /&gt;
|| data.docx&lt;br /&gt;
|-&lt;br /&gt;
| \number || &amp;#039;&amp;#039;&amp;#039;Backreference.&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
A set of different symbols of a regular expression can be grouped together to act as a single unit and behave as a block.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;\n&amp;#039;&amp;#039;&amp;#039; means that the group enclosed within the &amp;#039;&amp;#039;&amp;#039;n-th&amp;#039;&amp;#039;&amp;#039; bracket will be repeated at current position.&lt;br /&gt;
 ||  || ||&lt;br /&gt;
|-&lt;br /&gt;
| \1 || &amp;#039;&amp;#039;&amp;#039;Contents of Group 1.&amp;#039;&amp;#039;&amp;#039; || r(\w)g&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039;x || regex&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is e&lt;br /&gt;
 || regxx&lt;br /&gt;
|-&lt;br /&gt;
| \2 ||&amp;#039;&amp;#039;&amp;#039;Contents of Group 2.&amp;#039;&amp;#039;&amp;#039;  || (\d\d)\+(\d\d)=&amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039;\+&amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; || 20+21=21+20&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\1&amp;#039;&amp;#039;&amp;#039; is 20&lt;br /&gt;
&lt;br /&gt;
Group &amp;#039;&amp;#039;&amp;#039;\2&amp;#039;&amp;#039;&amp;#039; is 21&lt;br /&gt;
 || 20+21=20+21&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Sample Problems =&lt;br /&gt;
&lt;br /&gt;
Typical problems in the category will include:  translate an FSA to a Regular Expression; simplify a Regular Expression; determine which Regular Expressions or FSAs are equivalent; and determine which strings are accepted by either an FSA or a Regular Expression.&lt;br /&gt;
&lt;br /&gt;
== Problem 1 ==&lt;br /&gt;
&lt;br /&gt;
Find a simplified Regular Expression for the following FSA:&lt;br /&gt;
&lt;br /&gt;
[[File:fsa_s1.png]]&lt;br /&gt;
 	&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The expression 01*01 is read directly from the FSA.  It is in its most simplified form.&lt;br /&gt;
&lt;br /&gt;
== Problem 2 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings are accepted by the following Regular Expression &amp;quot;00*1*1U11*0*0&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::A. 0000001111111&lt;br /&gt;
::B. 1010101010&lt;br /&gt;
::C. 1111111&lt;br /&gt;
::D. 0110&lt;br /&gt;
::E. 10	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This Regular Expression parses strings described by the union of 00*1*1 and 11*0*0.  The RE 00*1*1 matches strings starting with one or more 0s followed by one or more 1s:  01, 001, 0001111, and so on. The RE 11*0*0 matches strings with one or more 1s followed by one or more 0s:  10, 1110, 1111100, and so on.  In other words, strings of the form:  0s followed by some 1s; or 1s followed by some 0s.  Choice A and E following this pattern.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which, if any, of the following Regular Expressions are equivalent?&lt;br /&gt;
::A. (a U b)(ab*)(b* U a)&lt;br /&gt;
::B. (aab* U bab*)a&lt;br /&gt;
::C. aab* U bab* U aaba U bab*a&lt;br /&gt;
::D. aab* U bab* U aab*a U bab*a&lt;br /&gt;
::E. a* U b*	&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Choice B can be discarded because it is the only RE whose strings &amp;#039;&amp;#039;&amp;#039;must&amp;#039;&amp;#039;&amp;#039; end with an a.  Choice E can be discarded since it is the only RE that can accept a null string. Choices C and D are not equal.  After expanding choice A, we must compare it to choices C and D.  It is equal to choice D, but not to choice C. The only REs that are equivalent are choices A and D.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 3 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-D]*[a-d]*[0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. ABCD8&lt;br /&gt;
::2. abcd5&lt;br /&gt;
::3. ABcd9&lt;br /&gt;
::4. AbCd7&lt;br /&gt;
::5. X&lt;br /&gt;
::6. abCD7&lt;br /&gt;
::7. DCCBBBaaaa5&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The pattern describes strings the start with zero or more uppercase letters A, B, C, or D (in any order), followed&lt;br /&gt;
by zero or more lowercase letter a, b, c, or d (in any order), followed by a single digit.&lt;br /&gt;
The strings that are represented by this pattern are 1, 2, 3, and 7.&lt;br /&gt;
&lt;br /&gt;
== Problem 4 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;Hi?g+h+[^a-ceiou]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. Highb&lt;br /&gt;
::2. HiiighS&lt;br /&gt;
::3. HigghhhC&lt;br /&gt;
::4. Hih&lt;br /&gt;
::5. Hghe&lt;br /&gt;
::6. Highd&lt;br /&gt;
::7. HgggggghX&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The ? indicates 0 or 1 &amp;quot;i&amp;quot;s. The + indicates 1 or more &amp;quot;g&amp;quot;s followed by 1 or more &amp;quot;h&amp;quot;s. &lt;br /&gt;
The ^ indicates that the last character cannot be lower-case a, b, c, e, i, o, or u.&lt;br /&gt;
The strings that are represented by this pattern are 3, 6, and 7. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;[A-E|a-e]*(00[01])|([10]11)&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. DAD001&lt;br /&gt;
::2. bad000&lt;br /&gt;
::3. aCe0011&lt;br /&gt;
::4. AbE111&lt;br /&gt;
::5. AAAbbC&lt;br /&gt;
::6. aBBBe011&lt;br /&gt;
::7. 001011&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
The [A-E|a-e]* allows for any of those letters in any order 0 or more times. Therefore, all of the &lt;br /&gt;
choices match at the beginning of the string. The end of the string must match &amp;quot;000&amp;quot;, &amp;quot;001&amp;quot;, &amp;quot;111&amp;quot;, &lt;br /&gt;
or &amp;quot;011&amp;quot;. That means that 1, 2, 4, and 6 match.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
== Problem 5 ==&lt;br /&gt;
&lt;br /&gt;
Which of the following strings match the regular expression pattern &amp;quot;^w{3}\.([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])+\.)+[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;quot; ?&lt;br /&gt;
&lt;br /&gt;
::1. www.google.com&lt;br /&gt;
::2. www.-petsmart.com&lt;br /&gt;
::3. www.edu-.ro&lt;br /&gt;
::4. www.google.co.in&lt;br /&gt;
::5. www.examples.c.net&lt;br /&gt;
::6. www.edu.training.computer-science.org&lt;br /&gt;
::7. www.everglades_holidaypark.com&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Solution:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
This Regular Expression matches a domain name used to access web sites.&lt;br /&gt;
&lt;br /&gt;
RE starts with the subdomain www, continues with a number of names of domains, separated by a dot (Top-level domain (TLD), Second-level domain (SLD), Third-level domain, and so on).&lt;br /&gt;
&lt;br /&gt;
The name of a domain contains only small letters, digits and hyphen. The name can’t begin and can’t finish with a hyphen character. The length of the domain’s name is minimum 2 and maximum 63 characters.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;^&amp;#039;&amp;#039;&amp;#039;:  the string starts with &amp;#039;&amp;#039;&amp;#039;www&amp;#039;&amp;#039;&amp;#039;, followed by a dot character;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[a-z0-9]&amp;#039;&amp;#039;&amp;#039; : the first and the last character of the domain&amp;#039;s name can be only a small letter or a digit;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;[-a-z0-9]{0,61}&amp;#039;&amp;#039;&amp;#039;: the next characters can be small letters, digits or a hyphen character. Maximum 61 characters;&lt;br /&gt;
&lt;br /&gt;
The last sequence &amp;#039;&amp;#039;&amp;#039;[a-z0-9][-a-z0-9]{0,61}[a-z0-9]&amp;#039;&amp;#039;&amp;#039; is for the Top-Level domain, which is not followed by a dot.&lt;br /&gt;
&lt;br /&gt;
The strings that are represented by this pattern are 1, 4 and 6.&lt;br /&gt;
==Problem 6==&lt;br /&gt;
&lt;br /&gt;
= Video Resources =&lt;br /&gt;
&lt;br /&gt;
Nice two-part video showing the relationship between FSAs and REs. &lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/GwsU2LPs85U&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/GwsU2LPs85U &amp;#039;&amp;#039;1 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/shN_kHBFOUE&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/shN_kHBFOUE &amp;#039;&amp;#039;2 - Convert Regular Expression to Finite-State Automaton&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Barry Brown&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
This video uses the symbol &amp;quot;+&amp;quot; to mean &amp;quot;1 or more matches of the previous term&amp;quot;. For example, &amp;quot;ab+&amp;quot; is the same as &amp;quot;abb*&amp;quot;.  In terms of the Kleene Star, zz* = z*z = z+.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;https://youtu.be/vI_yv0WuAhk&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [https://youtu.be/vI_yv0WuAhk &amp;#039;&amp;#039;ACSL Test Prep - Finite State Automaton &amp;amp; Regular Expressions Explained&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;Mrs. Gupta&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
A talked-over presentation discussing the finite state automatons and regular expressions as needed for the American Computer Science League and its tests. &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;youtube width=&amp;quot;300&amp;quot; height=&amp;quot;180&amp;quot;&amp;gt;URL&amp;lt;/youtube&amp;gt;&lt;br /&gt;
| [URL &amp;#039;&amp;#039;TITLE&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;AUTHOR&amp;#039;&amp;#039;&amp;#039;)]&lt;br /&gt;
&lt;br /&gt;
DESCRIPTION&lt;br /&gt;
|}&lt;br /&gt;
--&amp;gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:C4OUT1.jpg&amp;diff=737</id>
		<title>File:C4OUT1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:C4OUT1.jpg&amp;diff=737"/>
		<updated>2020-08-25T17:07:31Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:T4IN1N.jpg&amp;diff=736</id>
		<title>File:T4IN1N.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:T4IN1N.jpg&amp;diff=736"/>
		<updated>2020-08-25T17:06:57Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:C4IN1.jpg&amp;diff=735</id>
		<title>File:C4IN1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:C4IN1.jpg&amp;diff=735"/>
		<updated>2020-08-25T17:06:08Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:C2OUT1.jpg&amp;diff=734</id>
		<title>File:C2OUT1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:C2OUT1.jpg&amp;diff=734"/>
		<updated>2020-08-25T17:05:28Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:T2IN1.jpg&amp;diff=733</id>
		<title>File:T2IN1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:T2IN1.jpg&amp;diff=733"/>
		<updated>2020-08-25T17:05:00Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:C2IN1.jpg&amp;diff=732</id>
		<title>File:C2IN1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:C2IN1.jpg&amp;diff=732"/>
		<updated>2020-08-25T17:04:31Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=731</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=731"/>
		<updated>2020-08-25T17:04:01Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases. As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Amoung these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|width=&amp;quot;425pt&amp;quot;|&amp;lt;center&amp;gt; [[File:C2IN1.jpg|380px]]&amp;lt;/center&amp;gt; ||width=&amp;quot;288pt&amp;quot;| [[File:T2IN1.jpg|160px]] ||width=&amp;quot;380pt&amp;quot;| &amp;lt;center&amp;gt;[[File:C2OUT1.jpg|190px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
== Sample problem 2 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:CIR6_A.jpg|420px]]  || [[File:T6n.jpg|290px]] || [[File:c6b.jpg|380px]]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Sample problem 3 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Initial circuit !! Karnaugh Map !! AND/OR circuit&lt;br /&gt;
|-&lt;br /&gt;
&lt;br /&gt;
|| [[File:C4IN1.jpg|460px]]  || [[File:T4IN1N.jpg|286px]] ||width=&amp;quot;346pt&amp;quot;| &amp;lt;center&amp;gt; [[File:C4OUT1.jpg|230px]]&amp;lt;/center&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=730</id>
		<title>Karnaugh Maps</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=Karnaugh_Maps&amp;diff=730"/>
		<updated>2020-08-25T17:02:46Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Introduction =&lt;br /&gt;
Logic design implies the analysis, synthesis, minimization, and implementation of binary functions.&lt;br /&gt;
Combinational logic refers to networks whose output is strictly dependent on the inputs. The analysis of such networks requires first the writing of the Boolean  algebraic equation representative of the network, and then the complete characterization of the output as a result of all the possible combinations of the inputs.&lt;br /&gt;
Minimization involves reducing the Boolean algebraic expression to some minimal form. &amp;lt;br /&amp;gt;&lt;br /&gt;
Any minimization tool in Boolean is based on the algebraic theorems. Algebraic reduction of Boolean functions is not easy and requires considerable experience, judgement and luck. It becomes more apparent as the complexity of the function increases. As a result extensive effort has been devoted toward developing techniques, aids or tools, that will allow the logic designer to minimize a function.  The Venn diagram, Veitch diagram, Karnaugh map, Quine-McCluskey method, and other techniques have all been developed with but one objective-to allow the designed to arrive at a minimal expression as rapidly as possible with the least amount of effort.&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
Amoung these methods the Karnaugh Maps (made by G. Karnaugh in 1953) will be presented bellow.&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Karnaugh map&amp;#039;&amp;#039;&amp;#039; technique is thought to be the most valuable tool available for dealing with Boolean functions. It provides instant recognition of the basic patterns, can be used to obtain all possible combinations and minimal terms, and is easily applied to all varieties of complex problems. Minimization with the map is accomplished through recognition of basic patterns.&amp;lt;br /&amp;gt;&lt;br /&gt;
The appearance of 1’s in adjacent cells immediately identifies the presence of a redundant variable. &amp;lt;br /&amp;gt;&lt;br /&gt;
The following figures illustrate some examples of minimizing with a three-variable map and four-variable map.&amp;lt;sup&amp;gt;[1]&amp;lt;/sup&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Karnaugh Map examples =&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T21.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T22.jpg|152px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T23.jpg|152px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T24.jpg|152px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T31.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T32.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T33.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T34.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T35.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T36.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T37.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T38.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T41.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T42.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T43.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T44.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T45.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T47.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T48.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T49.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
[[File:T410.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T411.jpg|256px]]&lt;br /&gt;
||&lt;br /&gt;
[[File:T412.jpg|256px]]&lt;br /&gt;
|| &lt;br /&gt;
[[File:T413.jpg|256px]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T71.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T72.jpg|469px]]&lt;br /&gt;
|-&lt;br /&gt;
|width=&amp;quot;525pt&amp;quot;|[[File:T73.jpg|469px]] ||width=&amp;quot;525pt&amp;quot;| [[File:T75.jpg|469px]] &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; RULES SUMMARY&amp;#039;&amp;#039;&amp;#039;&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No zeros allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No diagonals.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only power of 2 number of cells in each group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Groups should be as large as possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Every one must be in at least one group.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Overlapping allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Wrap around allowed.&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fewest number of groups possible.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
= Sample problems =&lt;br /&gt;
== Sample problem 1 ==&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039; Karnaugh Map to minimize a digital circuit &amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
1. William E. Wickes, Logic Design with Integrated Circuits, John Willey &amp;amp; Sons, Inc, New York-London-Sydney&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:T75.jpg&amp;diff=729</id>
		<title>File:T75.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:T75.jpg&amp;diff=729"/>
		<updated>2020-08-25T17:01:35Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
	<entry>
		<id>http://www.categories.acsl.org/wiki/index.php?title=File:T73.jpg&amp;diff=728</id>
		<title>File:T73.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.categories.acsl.org/wiki/index.php?title=File:T73.jpg&amp;diff=728"/>
		<updated>2020-08-25T17:01:09Z</updated>

		<summary type="html">&lt;p&gt;Mariana: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Mariana</name></author>
	</entry>
</feed>