if you seriously want to learn how they would be run read man economy and state - Murray rothbard or try and find a summary if you don't want to read it all
edit: for the love of everything good in this world stay FAR FAR AWAY from David D Friedman's 'machinery of freedom' that guy is a nut case