• edited by
1,706 views
3 3 votes

A $\text{3-ary}$  boolean function is a function that takes three boolean arguments and produces a boolean output. Let $f$ and $g$ be  $\text{3-ary}$ boolean functions. We say that $f$ and $g$ are neighbours if $f$ and $g$ agree on at least one input and disagree on at least one input: that is, there exist $x,\: y,\: z$ such that $f(x, y, z) = g(x, y, z)$ and $x',y',z'$ such that $f(x',y',z') \neq g(x',y',z')$.
Suppose we fix a $\text{3-ary}$ boolean function $h$. How many neighbours does $h$ have?

  1. $128$
  2. $132$
  3. $254$
  4. $256$

2 Answers

Best answer
7 7 votes
For $\text{3-ary}$ boolean functions there can be $8$ possible inputs.

We fixed a $\text{3-ary}$ boolean function $h$.

Total number of possible functions $=2^8=256.$

Functions not allowed to be neighbors of $h$ are the ones agreeing on all inputs (exactly one possible) and one which is disagreeing on all inputs (again exactly one where the Boolean output is the complement of $h)$.

Hence, $h$ has $256-2=254$ neighbors$.$
• selected by
Answer:
Position:
Show:

Related questions

1 1 vote
1 1 answer
992
992 views
go_editor asked May 19, 2016
992 views
Let $G=(V,E)$ be a undirected graph. We say $S \subseteq V$ is a clique if and only if for all $u,\: v \: \in S$, the edge $(u, v)$ is in $E$.Now let $G=(V,E)$ be a graph...
3 3 votes
1 1 answer
1.1k
1.1k views
go_editor asked May 19, 2016
1,071 views
Let $G$ be a connected graph. For a vertex $x$ of $G$ we denote by $G−x$ the graph formed by removing $x$ and all edges incident on $x$ from $G$. $G$ is said to be good i...
5 5 votes
1 1 answer
855
855 views
go_editor asked May 19, 2016
855 views
Consider the following functions $f$ and $g$:f(){ x = x+1; x = y*y; x = x-y; }g(){ y = y+1; y = x*x; y = y-x; }Suppose we start with initial values of $1$ for $x$ and $2$...
1 1 vote
1 1 answer
1.8k
1.8k views
go_editor asked May 19, 2016
1,775 views
You have a laptop with a fixed amount of memory and hard disk space and no external storage devices connected (CD, USB drives, . . . ). Which of the following is the most...