paint wall with k colours

Revision en1, by ddeka, 2018-11-29 00:00:05

Given a wall of L*W size. The wall is made up of bricks of sizes 1*1. We need to color the wall with K(given) colors such that no two adjacent bricks (bricks sharing a side) get the same coloring. How many ways to do achieve that? constraint: K, L and W are in the range of 100000.

-- how to approach this QS? Simple dynamic programming (states as position and try all colour etc.) is not feasible with given constraint. Thanks!

Tags counting

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English ddeka 2018-11-29 00:01:11 10 Tiny change: 'ition and try all colour etc.) is ' -> 'ition and check all colors etc.) is '
en1 English ddeka 2018-11-29 00:00:05 461 Initial revision (published)