{"id":6545,"date":"2018-07-10T15:46:28","date_gmt":"2018-07-10T14:46:28","guid":{"rendered":"http:\/\/smart--grid.net\/?page_id=6545"},"modified":"2022-12-03T23:01:56","modified_gmt":"2022-12-03T22:01:56","slug":"algorithme-de-brzozowski-et-mccluskey","status":"publish","type":"page","link":"https:\/\/complex-systems-ai.com\/en\/language-theory\/brzozowski-and-mccluskey-algorithm\/","title":{"rendered":"Brzozowski and McCluskey algorithm"},"content":{"rendered":"<div data-elementor-type=\"wp-page\" data-elementor-id=\"6545\" class=\"elementor elementor-6545\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-2b6b4ef elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"2b6b4ef\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-36c3d1c\" data-id=\"36c3d1c\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-59b0cd9 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"59b0cd9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/en\/language-theory\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Language theory<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-2c5d67f\" data-id=\"2c5d67f\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-75fafc9 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"75fafc9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/complex-systems-ai.com\/en\/\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Home page<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-836e7b8\" data-id=\"836e7b8\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-5fb8c52 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"5fb8c52\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<div class=\"elementor-button-wrapper\">\n\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/fr.wikipedia.org\/wiki\/M%C3%A9thode_de_Brzozowski_et_McCluskey\" target=\"_blank\" rel=\"noopener\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Wiki<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-ee8516d elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"ee8516d\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-abce6a7\" data-id=\"abce6a7\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-d43d8b1 elementor-widget elementor-widget-progress\" data-id=\"d43d8b1\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"progress.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t<span class=\"elementor-title\" id=\"elementor-progress-bar-d43d8b1\">\n\t\t\t\tDifficulty\t\t\t<\/span>\n\t\t\n\t\t<div aria-labelledby=\"elementor-progress-bar-d43d8b1\" class=\"elementor-progress-wrapper\" role=\"progressbar\" aria-valuemin=\"0\" aria-valuemax=\"100\" aria-valuenow=\"80\" aria-valuetext=\"80% (DIfficile)\">\n\t\t\t<div class=\"elementor-progress-bar\" data-max=\"80\">\n\t\t\t\t<span class=\"elementor-progress-text\">Hard<\/span>\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-progress-percentage\">80%<\/span>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-6490ed1c elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"6490ed1c\" data-element_type=\"section\" data-e-type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-472dbd75\" data-id=\"472dbd75\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6487506c elementor-widget elementor-widget-text-editor\" data-id=\"6487506c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/complex-systems-ai.com\/en\/language-theory\/brzozowski-and-mccluskey-algorithm\/#Algorithme-de-Brzozowski-et-McCluskey\" >Brzozowski and McCluskey algorithm<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/complex-systems-ai.com\/en\/language-theory\/brzozowski-and-mccluskey-algorithm\/#Reduction-de-lautomate\" >Automaton reduction<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Algorithme-de-Brzozowski-et-McCluskey\"><\/span>Brzozowski and McCluskey algorithm<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Brzozowski and McCluskey&#039;s algorithm makes intensive use of the graphical representation of the automaton. The automaton itself is generalized, allowing, as transition labels, not only letters, but <a href=\"https:\/\/complex-systems-ai.com\/en\/language-theory\/regular-languages-and-regular-expressions\/\">regular expressions<\/a>. Starting from a <a href=\"https:\/\/complex-systems-ai.com\/en\/language-theory\/\">automaton<\/a> finished, we progressively eliminate the states, and at the end, we end up with an automaton having a single transition. The label of this transition is a regular expression for the language recognized by the automaton.<\/p>\n\n<p>A generalized automaton is defined as a traditional non-deterministic finite automaton, with the following peculiarities:<\/p>\n\n<ul class=\"wp-block-list\">\n<li>it has only one initial state \u03b1 and only one final state \u03c9<\/li>\n<li>transitions are labeled with regular expressions<\/li>\n<li>no transition enters \u03b1 and no transition leaves the final state \u03c9.<\/li>\n<\/ul>\n\n<p>We can easily transform an ordinary automaton\u00a0<i>TO<\/i>\u00a0into a generalized automaton: it suffices to add the states \u03b1 and \u03c9 and \u03b5-transitions from \u03b1 to the initial states of\u00a0<i>TO<\/i>, and \u03b5-transitions of the terminal states of\u00a0<i>TO<\/i>\u00a0to \u03c9.<\/p>\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Reduction-de-lautomate\"><\/span>Automaton reduction<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n<p>Given a generalized automaton, we compute a generalized automaton having fewer transitions or states, by applying the transformations below without modifying the recognized language. At the end, there are only the two states \u03b1 and \u03c9 and a transition of \u03b1 and \u03c9 whose label is a regular expression denoting the recognized language. Transformations are reductions in transitions and reductions in states.<\/p>\n\n<p>To reduce a state, all the paths passing through this state (to an adjacent state) must be performed. The language recognized by this path is then added to the reduced PLC (see the example).<\/p>\n\n<p>The following example shows the main possible reductions as well as the regular expressions generated on the automaton:<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"alignnone wp-image-6546\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage47.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"220\" height=\"194\" title=\"\"><\/figure>\n\n<p>Which gives the following generalized automaton:<\/p>\n\n<figure class=\"wp-block-image\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-6547\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage48.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"394\" height=\"194\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage48.png 394w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage48-300x148.png 300w\" sizes=\"(max-width: 394px) 100vw, 394px\" \/><\/figure>\n\n<p>We eliminate q2: the path q0 -&gt; q2 -&gt; q3 gives the language a\u00b2, it is therefore added to the path q0 -&gt; q3. The path q3 -&gt; q2 -&gt; q3 gives the language ba or (ba) * because it is a loop on q3 -&gt; q3<\/p>\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" class=\"alignnone wp-image-6548\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage49.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"376\" height=\"201\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage49.png 376w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage49-300x160.png 300w\" sizes=\"(max-width: 376px) 100vw, 376px\" \/><\/figure>\n\n<p>We eliminate q1: here the loop on q1 will give an a *<\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6549\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage50.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"391\" height=\"90\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage50.png 391w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage50-300x69.png 300w\" sizes=\"(max-width: 391px) 100vw, 391px\" \/><\/figure>\n\n<p>We eliminate q0:<\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6550\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage51.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"309\" height=\"84\" title=\"\" srcset=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage51.png 309w, https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage51-300x82.png 300w\" sizes=\"(max-width: 309px) 100vw, 309px\" \/><\/figure>\n\n<p>We eliminate q3:<\/p>\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-6551\" src=\"https:\/\/complex-systems-ai.com\/wp-content\/uploads\/2018\/07\/langage52.png\" alt=\"Brzozowski and McCluskey algorithm\" width=\"242\" height=\"61\" title=\"\"><\/figure>\n\n<p>Note that the expression obtained also depends on the order of elimination, but that all the languages generated are equal.<\/p>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>","protected":false},"excerpt":{"rendered":"<p>Language theory Home page Wiki Difficulty HARD 80% Brzozowski and McCluskey&#039;s algorithm The Brzozowski and McCluskey&#039;s algorithm makes intensive use of the \u2026 <\/p>","protected":false},"author":1,"featured_media":0,"parent":5028,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6545","page","type-page","status-publish","hentry"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/6545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/comments?post=6545"}],"version-history":[{"count":7,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/6545\/revisions"}],"predecessor-version":[{"id":18649,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/6545\/revisions\/18649"}],"up":[{"embeddable":true,"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/pages\/5028"}],"wp:attachment":[{"href":"https:\/\/complex-systems-ai.com\/en\/wp-json\/wp\/v2\/media?parent=6545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}