Set Operations

This program generates the intersection, union, relative composition, cross product, and power set, of given input (which generates the sets the operations are performed on. ///////////////////////////////////////////////////////////////////////////////// #include <iostream> #include <vector> #include <algorithm> #include <iterator> #include <sstream> //////////////////////////////////////////////////////////////////////////////// std::vector<std::string> createSet(void); // creates set from user input std::vector<std::string> getIntersection(std::vector<std::string> set_A, std::vector<std::string> set_B); …

Modulo Congruence

//////////////////////////////////////////////////////////////////////////////// #include <iostream> #include <math> //////////////////////////////////////////////////////////////////////////////// void numberQuery(unsigned long long &a, unsigned long long &n, unsigned long long &m); unsigned long long powertworesidual(unsigned long long a, unsigned long long n, unsigned long long m); unsigned long long nonpowertworesidual(unsigned long long a, unsigned long long n, unsigned long long m); //////////////////////////////////////////////////////////////////////////////// …