# Calculating the size of the

N/A
N/A
Protected

Share "Calculating the size of the"

Copied!
56
0
0
Laat meer zien ( pagina)

Hele tekst

(1)

## intuitionistic logic

(2)

n

n

8

(3)

n+1

n

n+2

n

n+2

n

n

int

0

n+1

n

n

n+2

n

n

n

n

(4)

n

n

int

n

0

1

n−1

n

int

n

n

2n

0

8

8

3

n

n

n

n

n

(5)

+

±

(6)

n

n

n

n

n

0

1

2

n

0

1

2

0

1

2

8

8

int

n−2

n

6

8

n+1

n

n

k+1

k

n

k+1

k

(7)

k

k+1

k+1

k

2

1

1

1

2

2

3

n+2

n

n+2

n+2

n

n+2

n+2

n+2

n

n+2

n

4

(8)

n+2

n

n−2

n+2

n+2

n+2

c

c

c

n

n

n

n

n

n

(9)

n

n

n

n+2

n+2

n+2

C∈Dn

B∈Dn

n+2

n

n

n+2

n

n

n

n

n

n

n

n

n

n

n

n

n

(10)

n+2

C∈Dn

B∈Dn

n

n

K∈Rn

C∼K

B∈Dn

K∈Rn

π∈p(K)

B∈Dn

n

n

n

K∈Rn

π∈p(K)

B∈Dn

K∈Rn

π∈p(K)

B∈Dn

K∈Rn

B∈Dn

K∈Rn

B∈Dn

n

n

n

n

n

(11)

clas

int

clas

int

(12)

P

P

Q∈X

p∈Q

p∈P −Q

P

P

Q∈X

p∈Q

p∈P −Q

int

P

p∈Q

X∈A

P

P

P

P

n

n

n

n

int

n

(13)

2n

0

n−1

n

n

n

n

n

0

n−1

0

n−1

n

n

n

i

n

+

n

int

+

+

n

0

n−1

+

n

0

n−1

i

i

n

±

n

i

n

n

int

±

n

i

n

X∈M±(Q(2n))

#{i|αn(i)∈X}

X∈D(2n)

#{i|αn(i)∈X}

n

n

(14)

n

n

2n

2n

n

k=0

c

c

c

c

c

c

c

c

c

u

c

c

c

c

c

c

c

c

c

u c c u

u c c

u c

c u

c c

n

n

(15)

c c c

u

u

c c c

u c c c

u c c u c

u c c c u

c c c u

u

n

c c

c c

2n

n

n

n

n

n

n

n

n

n

n

0n

0n

n

n

n

0n

0n

n

n

n

n

0n

0n

0−n

0n

n

(16)

2n

0

2n

n

n

2n

0n

0

2n−2

4

0n

0

0

0

n

2n−2

4

0−n

0

n

C∈D02n −2(k)

B∈D2n −2

n

n

K∈R2n−2

π∈p0(K,k)

B∈D2n −2

K∈R2n −2

π∈p0(K,k)

B∈D2n −2

n

n

n

K∈R2n −2

π∈p0(K,k)

B∈D2n −2

K∈R2n −2

B∈D2n −2

K∈R2n −2

B∈D2n −2

02n−2

2n−2

0

n

0

n

0

0

n

0

n

0

n

0

n

(17)

n

n

n

k=0

k

k

n

i

n

i

n

int

±

n

i

n

X∈M±(Q(2n))

#{i|αn(i)∈X}

X∈D(2n)

#{i|αn(i)∈X}

n

0

0

n

n

n

int

X∈D(2n)

#{i|αn(i)∈X}

n

n

k=0

n−k

0

n

0

2n

2n

n

k=0

0

(18)

0

2n

0

2n

n

n

2n

0n

2n−2

4

0n

0

0

n

2n−2

4

0−n

C∈D002n −2(k)

B∈D2n −2

n

n

K∈R2n −2

π∈p00(K,k)

B∈D2n −2

K∈R2n −2

π∈p00(K,k)

B∈D2n −2

n

n

n

K∈R2n −2

π∈p00(K,k)

B∈D2n −2

K∈R2n −2

B∈D2n −2

0

K∈R2n −2

0

B∈D2n −2

002n−2

2n−2

0−n

00

0−n

0

0−n

(19)

n

n

n

k=0

n−k

0

k

(20)

n

n

0

1

n

ni=0

ai

3

8

128

n

n

64

n

### Listing 1: project/uint128/operatormultiply.cpp

1 # include " uint128 .ih"

2

3 namespace Dedekind

4 {

5 UInt128 & UInt128 :: operator *=( uint_fast64_t other )

6 {

7 UInt128 temp (* this );

(21)

8 d_lo =0; d_hi =0;

9 for ( uint_fast64_t i =0;i <64; i ++) { 10 if (( other &1) !=0) {

11 * this += ( temp .d_lo <<i);

12 d_hi += ( temp .d_hi <<i);

13 if ( i!= 0) // can 't bitshift 64 bits

14 d_hi += ( temp .d_lo > >(64 -i));

15 }

16 other > >=1;

17 }

18 return * this ;

19 }

20 }

### Listing 2: project/dedekind/bitsetoperleq.h

1 bool operator <=( std :: bitset <size > lhs , std :: bitset <size > const & rhs )

2 {

3 return ( lhs . flip () | rhs ). all ();

4 }

n

### Listing 3: project/dedekind/operwiedemann.h

1 template <size_t size >

2 std :: bitset <( size << 1) > concatenate ( std :: bitset <size > const &lhs , 3 std :: bitset <size > const & rhs )

4 {

5 std :: string lhs_str = lhs . to_string ();

6 std :: string rhs_str = rhs . to_string ();

7

8 return std :: bitset <( size << 1) >( lhs_str + rhs_str );

9 }

(22)

### Listing 4: project/dedekind/powersetbin.h

1 template <size_t size >

2 struct PowerSet

3 {

4 static std :: vector < std :: bitset <size >> powerSetBin ();

5 };

6

7 template <size_t size >

8 std :: vector < std :: bitset <size >> PowerSet <size >:: powerSetBin ()

9 {

10 auto current = PowerSet < size - 1 >:: powerSetBin ();

11

12 std :: vector < std :: bitset <size >> result ;

13 for ( auto iter = current . begin (); iter != current . end (); ++ iter )

14 {

15 std :: bitset <size > tmp ((* iter ). to_ulong () + (1 << ( size - 1)));

16 result . push_back ( tmp );

17 }

18

19 for ( auto iter = current . begin (); iter != current . end (); ++ iter )

20 {

21 std :: bitset <size > tmp ((* iter ). to_ulong ());

22 result . push_back ( tmp );

23 }

24

25 return result ;

26 } 27 28

29 template <>

30 struct PowerSet <0>

31 {

32 static std :: vector < std :: bitset <0>> powerSetBin ();

33 };

34

35 std :: vector < std :: bitset <0>> PowerSet <0 >:: powerSetBin () 36 {

37 return std :: vector < std :: bitset <0 > >({ std :: bitset <0 >() });

38 }

### Listing 5: project/dedekind/permutations.h

1 template <size_t size >

2 std :: bitset <size > permute ( std :: array < size_t , size > const & permutation , 3 std :: bitset <size > const & elem )

4 {

5 std :: bitset <size > result ;

6 for ( size_t idx = 0; idx != result . size (); ++ idx )

7 {

8 result [ idx ] = elem [ permutation [ idx ]];

9 }

10 return result ;

11 }

(23)

### Listing 6: project/dedekind/permutations.h

1 template <size_t size >

2 std :: set < std :: bitset <size >, BitSetLess > equivalences ( 3 std :: bitset <size > const &bset ,

4 std :: vector < std :: array < size_t , size >> const & perms )

5 {

6 std :: set < std :: bitset <size >, BitSetLess > result ;

7 for ( auto iter = perms . begin (); iter != perms . end (); ++ iter )

8 {

9 std :: bitset <size > temp = permute (* iter , bset );

10 result . insert ( temp );

11 }

12 return result ;

13 }

### Listing 7: project/dedekind/bitsetless.h

1 class BitSetLess

2 {

3 public :

4 template < size_t size >

5 bool operator ()( std :: bitset <size > const &lhs , 6 std :: bitset <size > const & rhs ) const

7 {

8 return lhs . to_ulong () > rhs . to_ulong ();

9 }

10 };

n

0

1

n

ni=0

ai

n

n

n

n

n

0

n

(24)

### Listing 8: project/dedekind/dedekind.h

1 std :: vector < size_t > generateIndexes ( size_t n = 2)

2 {

3 std :: vector < size_t > indexes (n ,0) ; 4 for ( size_t x = 1; x<n;x ++)

5 {

6 indexes [x ]=0;

7 }

8 for ( size_t x = 0; x <(1 < <n) -1;x ++)

9 {

10 for ( size_t i = 0;i<n;i ++)

11 {

12 if(x & (1<<i))

13 {

14 if( x == ((1 < <n) -2)) indexes [i ]+=1;

15 else indexes [i] += (1<<x);

16 }

17 }

18 }

19 return indexes ;

20 }

n

### Listing 9: project/dedekind/dedekind.h

1 template <size_t size >

2 std :: vector < size_t > calculateGammas ( std :: vector < std :: bitset <size >> const elem , size_t n, std :: vector < size_t > indexes ){

3 size_t length = n/2 + 1;

4 std :: vector < size_t > result ( length ,0) ;

5 for ( auto iter = elem . begin (); iter != elem . end (); ++ iter )

6 {

7 bool valid = true ;

8 size_t counter = 0;

9 size_t secondcounter = 0;

10 for ( auto it = indexes . begin (); it != indexes . end (); ++ it)

11 {

12 if ((* iter ). test (* it))

13 {

14 if ( counter == secondcounter ) counter ++;

15 else valid = false ;

16 }

17 secondcounter ++;

18 }

19 if( valid == true && counter <= length -1 )

20 {

21 result [ counter ]++;

22 }

23 }

24 return result ;

25 }

(25)

### Listing 10: project-alt/dedekind/dedekind.h

1 template <size_t size >

2 std :: vector < size_t > calculateGammas ( std :: vector < std :: bitset <size >> const elem , size_t n, std :: vector < size_t > indexes ){

3 size_t length = n + 1;

4 std :: vector < size_t > result ( length ,0) ;

5 for ( auto iter = elem . begin (); iter != elem . end (); ++ iter )

6 {

7 size_t counter =0;

8 for ( size_t i = 0; i < n; i ++)

9 {

10 if ((* iter ). test ( indexes [i]))

11 {

12 counter ++;

13 }

14 }

15 result [ counter ]++;

16 }

17 return result ;

18 }

n+1

n

n+1

n

n

n

n

n+1

n+1

### Listing 11: project/dedekind/dedekind.h

1 template <size_t size >

2 std :: vector < std :: bitset <( size << 1) > > generate ( 3 std :: vector < std :: bitset <size > > const &dn)

4 {

5 std :: vector < std :: bitset <( size << 1) > > dn1 ; 6

7 for ( auto iter = dn. begin (); iter != dn. end (); ++ iter )

8 {

9 for ( auto iter2 = dn. begin (); iter2 != dn. end (); ++ iter2 )

10 {

11 if (* iter <= * iter2 )

12 {

13 dn1 . push_back ( Internal :: concatenate (* iter , * iter2 ));

14 }

15 }

16 }

(26)

18 return dn1 ;

19 }

n

n

n

n

### Listing 12: project/dedekind/dedekind.h

1 template <size_t Number , size_t Power >

2 std :: vector < std :: vector < std :: bitset <Power >>> generateRn ( 3 std :: vector < std :: bitset <Power >> const &dn)

4 {

5 auto permutations = Internal :: permutations < Number , Power >() ; 6

7 std :: vector < std :: vector < std :: bitset <Power >>> rn;

8 std :: set < std :: bitset <Power >, BitSetLess > processed ; 9 for ( auto iter = dn. begin (); iter != dn. end (); ++ iter )

10 {

11 if ( processed . find (* iter ) == processed . end ())

12 {

13 auto equivs = Internal :: equivalences (* iter , permutations );

14

15 std :: vector < std :: bitset <Power >> permuted ;

16 copy ( equivs . begin () , equivs . end () , std :: back_inserter ( permuted ));

17 for ( auto perm = equivs . begin (); perm != equivs . end (); ++ perm )

18 {

19 processed . insert (* perm );

20 }

21

22 rn. push_back ( permuted );

23 }

24 }

25

26 return rn;

27 }

n+2

n

n

n+2

(27)

8

n

n

### Listing 13: bachelor-project/dedekind/dedekind.h

1 template <size_t size >

2 UInt128 enumerate ( std :: vector < std :: bitset <size >> const &dn , 3 std :: vector < std :: vector < std :: bitset <size >>> const &rn ,

4 size_t rank = 0, size_t nprocs = 1)

5 {

6 std :: map < std :: bitset <size >, std :: bitset <size >, BitSetLess > duals ; 7 std :: map < std :: bitset <size >, size_t , BitSetLess > etas ;

8

9 // Preprocess duals and eta 's of all elements

10 for ( auto iter = rn. begin (); iter != rn. end (); ++ iter )

11 {

12 auto elem = (* iter ). begin ();

13 size_t tmp = Internal :: eta (* elem , dn);

14 for (; elem != (* iter ). end (); ++ elem )

15 {

16 etas [* elem ] = tmp ;

17 duals [* elem ] = Internal :: dual (* elem );

18 }

19 }

20 // Preprocessing complete

21 22

23 UInt128 result ;

24 for ( size_t idx = rank ; idx < rn. size (); idx += nprocs )

25 {

26 auto iter (rn[ idx ]. begin ());

27 for ( auto iter2 = dn. begin (); iter2 != dn. end (); ++ iter2 )

28 {

29 auto first = * iter & * iter2 ;

30 auto second = duals [* iter ] & duals [* iter2 ];

31

32 result += rn[ idx ]. size () * etas [ first ] * etas [ second ];

33 }

34 }

35

36 return result ;

37 }

n

n

n

(28)

0−n

n

n

n

### Listing 14: project/dedekind/dedekind.h

1 template <size_t size >

2 UInt128 * enumerate ( std :: vector < std :: bitset <size > > const &dn , 3 std :: vector < std :: vector < std :: bitset <size > > > const &rn ,

4 size_t rank = 0, size_t nprocs = 1, size_t n= 2 )

5 {

6 std :: map < std :: bitset <size >, std :: bitset <size >, BitSetLess > duals ; 7 std :: map < std :: bitset <size >, size_t , BitSetLess > etas ;

8 size_t length = n/2 + 1;

9 // Preprocess gamma 's, duals and eta 's of all elements 10 std :: vector < size_t > indexes = generateIndexes (n);

11 for ( auto iter = rn. begin (); iter != rn. end (); ++ iter )

12 {

13

14 auto elem = (* iter ). begin ();

15 size_t tmp = Internal :: eta (* elem , dn);

16 for (; elem != (* iter ). end (); ++ elem )

17 {

18 etas [* elem ] = tmp ;

19 duals [* elem ] = Internal :: dual (* elem );

20 }

21 }

22 23

24 UInt128 * result ;

25 result = new UInt128 [ length ];

26 for ( size_t idx = rank ; idx < rn. size (); idx += nprocs )

27 {

28 auto iter (rn[ idx ]. begin ());

29 std :: vector < size_t > gamma = calculateGammas (rn[ idx ],n, indexes );

30 for ( auto iter2 = dn. begin (); iter2 != dn. end (); ++ iter2 )

31 {

32 auto first = * iter & * iter2 ;

33 auto second = duals [* iter ] & duals [* iter2 ];

34

35 for ( size_t i =0;i< length ;i ++)

36 {

37 result [i] += gamma [i] * etas [ first ] * etas [ second ];

38 }

39 }

40 }

41

42 return result ;

43 }

n

n

(29)

### Listing 15: project/main.cpp

1 for ( size_t i =0;i <=n;i ++)

2 {

3 uint_fast64_t temp = ( factorial (n) / ( factorial (n-i)*

factorial (i)));

4

5 size_t index = (i>n/2 ? n-i:i);

6 dedekindnumber += ( result [ index ]) * temp ;

7 othernumber += ( result [ index ]) * ( temp *(1 < <i));

8 }

9 othernumber -= (1<<n);

n

### Listing 16: project-alt/dedekind/dedekind.h

1 template <size_t size >

2 UInt128 * enumerate ( std :: vector < std :: bitset <size > > const &dn , 3 std :: vector < std :: vector < std :: bitset <size > > > const &rn ,

4 size_t rank = 0, size_t nprocs = 1, size_t n= 2 )

5 {

6 std :: map < std :: bitset <size >, std :: bitset <size >, BitSetLess > duals ; 7 std :: map < std :: bitset <size >, size_t , BitSetLess > etas ;

8 size_t length = n + 1;

9 // Preprocess gamma 's, duals and eta 's of all elements 10 std :: vector < size_t > indexes = generateIndexes (n);

11 for ( auto iter = rn. begin (); iter != rn. end (); ++ iter )

12 {

13

14 auto elem = (* iter ). begin ();

15 size_t tmp = Internal :: eta (* elem , dn);

16 for (; elem != (* iter ). end (); ++ elem )

17 {

18 etas [* elem ] = tmp ;

19 duals [* elem ] = Internal :: dual (* elem );

20 }

21 }

22 23

24 UInt128 * result ;

25 result = new UInt128 [ length ];

26 for ( size_t idx = rank ; idx < rn. size (); idx += nprocs )

27 {

28 auto iter (rn[ idx ]. begin ());

29 std :: vector < size_t > gamma = calculateGammas (rn[ idx ],n, indexes );

30 for ( auto iter2 = dn. begin (); iter2 != dn. end (); ++ iter2 )

31 {

32 auto first = * iter & * iter2 ;

33 auto second = duals [* iter ] & duals [* iter2 ];

34

35 for ( size_t i =0;i< length ;i ++)

36 {

37 result [i] += gamma [i] * etas [ first ] * etas [ second ];

38 }

(30)

40 }

41 return result ;

42 }

### Listing 17: project-alt/main.cpp

1 for ( size_t i =0;i <=n;i ++)

2 {

3 cout << result [i] << "\n";

4 dedekindnumber += result [i];

5 othernumber += result [i] *(1 < <(n-i));

6 }

7 othernumber -= (1<<n);

(31)

8

3

3

8

8

4

16

8

9

14

4

n

int

n

int

(32)

(33)

### Listing 18: project/main.ih

1

2 # include <iostream >

3 # include <sstream >

4 # include <mpi .h>

5 # include <sys / time .h>

6

7 # include " dedekind / dedekind .h"

8 # include " uint128 / uint128 .h"

9

10 using namespace std ; 11

12

13 struct timeval tim2 ; 14

15

16 typedef Dedekind :: UInt128 * (* fptr )( size_t , size_t );

17

18 template <size_t a = 3>

19 fptr findFunction ( size_t b) 20 {

21 if (a == b)

22 {

23 return Dedekind :: monotoneSubsets <a >;

24 }

25 else

26 {

27 return findFunction <a - 1>(b);

28 }

29 } 30

31 template <>

32 fptr findFunction <1 >( size_t b) 33 {

34 return Dedekind :: monotoneSubsets <1 >;

35 }

(34)

### Listing 19: project/main.cpp

1

2 # include " main .ih"

3

4 uint_fast64_t factorial ( size_t n){

5 uint_fast64_t tmp =1;

6 for ( size_t i =2;i <=n;i ++)

7 tmp *= i;

8 return tmp ;

9 }

10

11 int main ( int argc , char ** argv ) 12 {

13 gettimeofday (& tim2 , NULL );

14

15 MPI :: Init (argc , argv );

16 MPI :: COMM_WORLD . Set_errhandler ( MPI :: ERRORS_THROW_EXCEPTIONS );

17

18 size_t rank = 0;

19 size_t size = 1;

20 try

21 {

22 rank = MPI :: COMM_WORLD . Get_rank ();

23 size = MPI :: COMM_WORLD . Get_size ();

24 }

25 catch ( MPI :: Exception const & exception )

26 {

27 cerr << " MPI error : " << exception . Get_error_code () << " - "

28 << exception . Get_error_string () << endl ;

29 }

30 31

32 if ( argc == 3 && string ( argv [1]) == "-d")

33 {

34 size_t n = 2;

35 stringstream ss( argv [2]) ; 36 ss >> n;

37

38 double start = MPI :: Wtime ();

39

40 // findFunction makes it very slow , this can be solved by replacing it

41 // with the following , replacing N for the Dedekind number to compute .

42 // Dedekind :: UInt128 * result = Dedekind :: monotoneSubsets <2 >( rank , size );

43 Dedekind :: UInt128 * result = findFunction (n)(rank , size );

44

45 double end = MPI :: Wtime ();

46 cerr << " Rank " << rank << " done !" /* Result : " << result */ << " in

"

47 << end - start << "s\n";

48 size_t length = n /2+1;

49 // reduce over all processes

50 if ( rank == 0)

51 {

52 size_t toReceive = (size -1) * length +1;

54 {

55 // send the high and the low part of the result

56 uint_fast64_t lohi [3];

57 for ( size_t i =0;i <3; i ++) {

(35)

58 lohi [i ]=0;

59 }

60 MPI :: Status status ;

61 MPI :: COMM_WORLD . Recv (lohi , 3, MPI :: UNSIGNED_LONG ,

62 MPI :: ANY_SOURCE , Dedekind :: BIGINTTAG , status );

63

64 Dedekind :: UInt128 tmp ( lohi [0] , lohi [1]) ;

65 result [ lohi [2]] += tmp ;

66 }

67

68 double final = MPI :: Wtime ();

69 Dedekind :: UInt128 dedekindnumber =0;

70 Dedekind :: UInt128 othernumber =0;

71 for ( size_t i =0;i <=n;i ++)

72 {

73 uint_fast64_t temp = ( factorial (n) / ( factorial (n-i)*

factorial (i)));

74

75 size_t index = (i>n/2 ? n-i:i);

76 dedekindnumber += ( result [ index ]) * temp ;

77 othernumber += ( result [ index ]) * ( temp *(1 < <i));

78 }

79 othernumber -= (1<<n);

80 cout << "d" << (1<<n) << " = " << dedekindnumber << " and zeta "

<< n << " = " << othernumber

81 << " (in " << final - start << "s)\n";

82 }

83 else

84 {

85 // send the high and the low part of the result

86 uint_fast64_t lohi [3];

87 for ( size_t i =0;i< length ;i ++) {

88 lohi [0] = result [i]. lo ();

89 lohi [1] = result [i]. hi ();

90 lohi [2] = i;

91 MPI :: COMM_WORLD . Bsend (& lohi , 3, MPI :: UNSIGNED_LONG , 0,

92 Dedekind :: BIGINTTAG );

93 }

94

95 double final = MPI :: Wtime ();

96 cerr << " Rank " << rank << " exiting ! Total : "

97 << final - start << "s\n";

98 }

99 }

100 else

101 {

102 cout << " Usage : mpirun -np N ./ project -d X \n"

103 << " Where X in [2.. n) is the Dedekind Number to calculate .\n"

104 << " And N is the number of processes you would like to use .\n\n"

105 << " Note : The program will also work when running normally "

106 << "( without using mpirun ).\n"

107 << "In that case the program will just run on 1 core .\n";

108 }

109 MPI :: Finalize ();

110 }

### Listing 20: project/dedekind/dedekind.h

1

2 # ifndef DEDEKIND_H_

(36)

5 # include <algorithm >

6 # include <bitset >

7 # include <iostream >

8 # include <map >

9 # include <set >

10 # include <vector >

11

12 # include " ../ uint128 / uint128 .h"

13

14 # include " bitsetless .h"

15 # include " bitsetoperleq .h"

16 # include " operwiedemann .h"

17 # include " permutations .h"

18 # include " powerof2 .h"

19 # include " powersetbin .h"

20 # include " vectoroperinsert .h"

21

22 namespace Dedekind 23 {

24 enum

25 {

26 BIGINTTAG

27 };

28

29 template <size_t Number , size_t Power >

30 std :: vector < std :: vector < std :: bitset <Power >>> generateRn ( 31 std :: vector < std :: bitset <Power >> const &dn)

32 {

33 auto permutations = Internal :: permutations < Number , Power >() ; 34

35 std :: vector < std :: vector < std :: bitset <Power >>> rn;

36 std :: set < std :: bitset <Power >, BitSetLess > processed ; 37 for ( auto iter = dn. begin (); iter != dn. end (); ++ iter )

38 {

39 if ( processed . find (* iter ) == processed . end ())

40 {

41 auto equivs = Internal :: equivalences (* iter , permutations );

42

43 std :: vector < std :: bitset <Power >> permuted ;

44 copy ( equivs . begin () , equivs . end () , std :: back_inserter ( permuted ));

45 for ( auto perm = equivs . begin (); perm != equivs . end (); ++ perm )

46 {

47 processed . insert (* perm );

48 }

49

50 rn. push_back ( permuted );

51 }

52 }

53

54 return rn;

55 }

56

57 template <size_t size >

58 std :: vector < size_t > calculateGammas ( std :: vector < std :: bitset <size >> const elem , size_t n, std :: vector < size_t > indexes ){

59 size_t length = n/2 + 1;

60 std :: vector < size_t > result ( length ,0) ;

61 for ( auto iter = elem . begin (); iter != elem . end (); ++ iter )

62 {

63 bool valid = true ;

Referenties

GERELATEERDE DOCUMENTEN

3 Ontwikkeling (CA-)bewaarsysternen met minimale risico's op inwendige afwijkingen 4 Nondestructieve testmethode voor holle en bruine peren. In het rapport worden de

In Indian philosophy, with an exception of Buddhist logic, the paradox of the negative judgment is primarily an epistemological problem*, For that reason, the problem1

V(A) est une valeur de vérité désignée. Dans L 3 il y a seulement une valeur de vérité désignée, à savoir ‘1’, mais dans d’autres systèmes de

1) Dialogical Logic is an ideal framework for the combination of different logics. 2) Concerning the formulation of non-classical logics dialogical logic offers a fruitful

Stone’s representation theorem can be applied to classical propositional logic to show that the Lindenbaum algebra of a set of propositions is isomorphic to the clopen subsets of

Studies on the impact of the globalization of the food system have become increasingly important in the context of food security and highlights that food availability and access

The idea behind the type assignment' is that the meaning of a sentence, a proposition, is a function that gives us a truth value in each world (and thus it is a function of type

In this paper we study model generation for an important type of non-classical logic called Horn logic with stratified negation.. Horn logic has important applications in

Since the TBox T is a finite set composed of general concept inclusion axioms, and the ABox A is a finite set composed of concept assertions, negations of concept assertions,

  x) and non-membership functions   x)) change. The rest of this paper is organized as follows. First, we briefly introduce FISs and IFIS of

In verschillende artikelen wordt verslag gedaan van ervaringen met technology as­ sessment die, voor zover dat duidelijk wordt, al dan niet met succes zijn ondernomen.. In

In 2007 he decided to specialize in anesthesiology and started as an anesthesiology registrar in 2008 at the University Medical Center Groningen, after working on the

This sur- prising increase of wave speed for weak disorder, and de- crease for stronger disorder, is due to two different effects overlapping: the increase of wave speed takes

Daarin staat dat (bestemmings)plannen moeten worden getoetst op hun gevolgen voor Natura 2000-gebieden. Zonder een dergelijk toetsing zal zo’n plan niet de benodigde goedkeuring

However, the remaining three middle sized autosome chromosome pairs were difficult to pair and to distinguish from one another, because of their high number and similar size

Hoogte spoor in m TAW Vondsten (V) en staalnames (St) Werkputcontour Structuur Nieuwe/nieuwste tijd Middeleeuwen/nieuwe tijd Middeleeuwen Romeinse tijd Metaaltijden/Romeinse

the first keystroke latency (K 1 ), which is purported to reflect lexical access ( Crump and Logan, 2010b ), the keystroke latencies for the stem as a whole less K 1 , which

LogEx gives feed forward in the form of hints on different levels: which for- mula has to be rewritten (in case of an equivalence proof), which rule should be applied, and a

sin ongrammatikaal as gevolg van die uitmekaarskuif daarvan. Die rema, wat die hoogsbeklemtoonde element is, word in die posisie naaste aan die sinseinde

[r]

The common expression for the Likelihood Ratio classifier using LDA assumes that the reference class mean is available.. In biometrics, this is often not the case and only a

Earlier studies on Holocene fills of upland lakes (Lago Forano and Fontana Manca) in northern Calabria, Italy, showed that these hold important palaeoecological archives, which

Selecteer uw taal

De website wordt vertaald naar de taal die u selecteert.

Aanbevolen talen voor jou:

Ander: