VLSI algorithms and architecture for relational operations