Cut function is used in Prolog when you want to restrict Prolog from backtracking into certain choicepoints or subgoals, either because the alternatives would give wrong solutions or for efficiency reasons.
Advantage of using cut in Prolog is :
- Through cut, we can often improve the efficiency of the program
- We can specify exclusive rules using cut