------
## 最终结论
```python
def simplify_path(path: str) -> str:
    stack = []
    parts = path.split('/')
    
    for part in parts:
        if part == '..':
            if stack:
                stack.pop()
        elif part and part != '.':
            stack.append(part)
    
    return '/' + '/'.join(stack)

# Example usage
print(simplify_path("/home/"))  # Output: "/home"
print(simplify_path("/a/./b/../../c/"))  # Output: "/c"
print(simplify_path("/../"))  # Output: "/"
print(simplify_path("/home//foo/"))  # Output: "/home/foo"
```