• Pada Algoritma pencarian banyak yang bisa kita temukan atau gunakan. Ada Merge Sort, Quick Sort, Bubble Sort, dan...
  • Pada dasarnya algoritma searching banyak kita jumpai. Apalagi hanya untuk mencari nilai minimum dan nilai maximum...
  • Kalian pasti sudah tahu apa itu Deret Fibonacci, ya benar. (Padahal gak jawab). Tetapi pada pembahasan kali ini kita akan membuar program...
  • Metoda Pencarian Biner ( Binary Search) hanya bisa diterapkan jika data array sudah terurut. Pengurutan Array bisa menggunakan jenis sorting ...
  • Salah satu contoh tipe algoritma brute force lainnya adalah linear search (pencarian berurutan), Dikatakan demikian karena algoritma ini menggunakan ...

Thursday, May 26, 2011

Join The Set: The Multiplication On The Set

This time we will discuss the multiplication on the set or the more frequently heard hipunan join. Multiple purpose here is not like multiplying 2 x 3 = 5, but we are combining two or more sets.

For example we have set A and B, A × B means the set of all ordered pairs with the first element of each pair selected from A and the second element selected from B.

Example:
A: {1,2,3} and B: {a, b, c},
then A x B = {(1, a), (1, b), (1, c), (2, a), (2, b), (2, c), (3, a), (3 , b), (3, c)}

After getting the process that occurs over and over - again we can make a program using nested loops. That loop is in the loop. I made ​​it like this:

For complete program can be downloaded at ziddu. Hopefully helpful my friend ..

Jadilah yang pertama mengomentari

Post a Comment

Tutorial Algorithm and Programming ©Template Blogger Green by Dicas Blogger.

To Up