Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

SAT-Table

SAT-Table

Mahmood Amintoosi, Fall 2026

Computer Science Dept, Ferdowsi University of Mashhad

Computing Stirling’s formula

S(N,m)=mS(N−1,m)+S(N−1,m−1)S(N,k)=kS(N−1,k)+S(N−1,k−1)S(N,m) = m S(N-1,m) + S(N-1,m-1) \\ S(N,k) = k S(N-1,k)+ S(N-1,k-1)
3
2375101
61664747505854495487450129694992261011432242869144177577783166025584730

Truth table with three variables

0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
[0. 0. 0.]
[0. 0. 1.]
[0. 1. 0.]
[0. 1. 1.]
[1. 0. 0.]
[1. 0. 1.]
[1. 1. 0.]
[1. 1. 1.]

How do we fix the function so that it returns each row of the truth table?

The following code is not correct

[0. 0. 0.]

Using yield :)

[0. 0. 0.]
[0. 0. 1.]
[0. 1. 0.]
[0. 1. 1.]
[1. 0. 0.]
[1. 0. 1.]
[1. 1. 0.]
[1. 1. 1.]