document.write( "Question 385048: SEVEN HOUSES IN A ROW ARE TO BE PAINTED WITH ONE OF THE COLORS RED, BLUE, GREEN OR YELLOW. IN HOW MANY DIFFERENT WAYS CAN THE HOUSES BE PAINTED SO THAT NO TWO ADJACENT HOUSES ARE THE SAME COLOR? \n" ); document.write( "
Algebra.Com's Answer #272644 by sudhanshu_kmr(1152)\"\" \"About 
You can put this solution on YOUR website!

\n" ); document.write( "We can paint first house by any one of colors(red, blue, green)...\r
\n" ); document.write( "\n" ); document.write( "so, no. of ways to paint first house = 3\r
\n" ); document.write( "\n" ); document.write( "now, no. of ways to paint second house = 2 (except the color of first house)\r
\n" ); document.write( "\n" ); document.write( "similarly, no. of ways to paint third house = 2 (except the color of second house)\r
\n" ); document.write( "\n" ); document.write( ":
\n" ); document.write( ":
\n" ); document.write( ":
\n" ); document.write( "similarly,no. of ways to paint seventh house = 2 (except the color of sixth house)\r
\n" ); document.write( "
\n" ); document.write( "\n" ); document.write( "total no. of ways = 3* 2^6\r
\n" ); document.write( "\n" ); document.write( "= 3 *64 \r
\n" ); document.write( "\n" ); document.write( "= 192
\n" ); document.write( "
\n" ); document.write( "
\n" );