'=========================================================================== ' Subject: NUMBER OF POSSIBLE COMBINATIONS Date: 08-25-96 (22:38) ' Author: Franklin Villamor Code: QB, QBasic, PDS ' Origin: artvil@ix.netcom.com Packet: ALGOR.ABC '=========================================================================== To find out how many possibilities there can be: cls input "Number of different states for each object: ", a input "Number of objects: ", b for x = 0 to b - 1 c = c + a^x next x print "Number of possibilities: ", c Imagine a row of four sheets of paper. Each paper can be in one of two states, either the blank side, or the written on side. The variable "a" is the number of states (in this case 2). The variable "b" is the number of objects (in this case 4). This will have 15 different unique combinations (which is "c").