Cross-Entropy Method: Theory with Applications