Problem Idea #2

Given a graph with n nodes and m edges(n <= 20, m <= 380) where each edge has a color(black or white) and a cost associated with it. find the min spanning tree of the graph such that every path in the tree is made up of alternating colored edges.
Solution : http://pastebin.com/St7BV1Yk