19.6: Ejercicios de programación
- Page ID
- 111232
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)\(\newcommand{\AA}{\unicode[.8,0]{x212B}}\)
Una función booleana o de conmutación en\(n\) variables es\(f : \{O, I\}^n \rightarrow \{ 0, I\}\text{.}\) un mapa Un polinomio booleano es un tipo especial de función booleana: es cualquier tipo de expresión booleana formada a partir de una combinación finita 4n de variables\(x_1, \ldots, x_n\) junto con \(O\)y\(I\text{,}\) usando las operaciones\(\vee\text{,}\)\(\wedge\text{,}\) y\('\text{.}\) Los valores de las funciones se definen en Tabla\(19.33\). Escribir un programa para evaluar polinomios booleanos.
\(Table \text { } 19.33.\)Polinomios booleanos
\(x\) | \(y\) | \(x'\) | \(x \vee y\) | \(x \wedge y\) |
\(0\) | \(0\) | \(1\) | \(0\) | \(0\) |
\(0\) | \(1\) | \(1\) | \(1\) | \(0\) |
\(1\) | \(0\) | \(0\) | \(1\) | \(0\) |
\(1\) | \(1\) | \(0\) | \(1\) | \(1\) |