Input-shrinking functions: theory and application