BooleanConsecutiveFunction
BooleanConsecutiveFunction[k,n]
represents a Boolean function of n variables that gives True if k consecutive variables are True.
BooleanConsecutiveFunction[{k,True},n]
treats the variable list as cyclic.
BooleanConsecutiveFunction[{k1,k2,…,kd},{n1,n2,…,nd}]
represents a Boolean function of n1 n2 ⋯ nd variables that gives True if all variables in a block of the variable array are True.
BooleanConsecutiveFunction[{{k1,k2,…,kd},{c1,c2,…,cd}},{n1,n2,…,nd}]
treats the i level of the variable array as cyclic if ci is True.
BooleanConsecutiveFunction[spec,{a1,a2,…}]
gives the Boolean expression in variables ai corresponding to the Boolean consecutive function specified by spec.
BooleanConsecutiveFunction[spec,{a1,a2,…},form]
gives the Boolean expression in the form specified by form.
Details
- BooleanConsecutiveFunction[k,n] is also known as linear consecutive-k-out-of-n:F.
- BooleanConsecutiveFunction[{k,True},n] is also known as circular consecutive-k-out-of-n:F.
- BooleanConsecutiveFunction[{k,False},n] is equivalent to BooleanConsecutiveFunction[k,n].
- BooleanConsecutiveFunction[{{k1,k2,…,kd},c},{n1,n2,…,nd}] is equivalent to BooleanConsecutiveFunction[{{k1,k2,…,kd},{c,c,…,c}},{n1,n2,…,nd}].
- BooleanConsecutiveFunction[spec] gives a Boolean function object that works like Function.
- BooleanConsecutiveFunction[spec][a1,a2,…] gives an implicit representation equivalent to the explicit Boolean expression BooleanConsecutiveFunction[spec,{a1,a2,…}].
- In BooleanConsecutiveFunction[…,{n1,n2,…,nd},…][vars], vars can be either an array of dimension-{n1,n2,…,nd} variables, or a list of n1 n2 ⋯ nd variables.
- In BooleanConsecutiveFunction[{k1,k2,…,kd},vars], vars needs to be a depth-d array of variables.
- BooleanConvert converts BooleanConsecutiveFunction[spec][vars] to an explicit Boolean expression.
- In BooleanConsecutiveFunction[spec,vars,form], the possible forms are as given for BooleanConvert.
- BooleanConsecutiveFunction[spec,vars] by default gives an expression in disjunctive normal form (DNF).
Examples
open all close allBasic Examples (3)
Create a consecutive-2-out-of-3 Boolean function:
Use BooleanConsecutiveFunction in ReliabilityDistribution:
In[1]:= |
In[2]:= |
Compute the survival function:
Use BooleanConsecutiveFunction in FailureDistribution:
In[1]:= |
In[2]:= |